V4CC - Cocoa examples problem

Dave Parizek dave at Parizek.com
Wed May 31 21:47:07 CDT 2006


> Hey Dave, what does the crash log say?

I am not sure where the crash log is.  Is this something that goes to  
the Console?  A system.log file somewhere?  Sorry, Cocoa and XCode  
newbie here...

> Did you execute the run script to do the sym link to vkernel lib?

No, not before.  Will do now...  ...Added a run script build phase  
just now to Ruslan's example:

#mkdir $BUILT_PRODUCTS_DIR/$PRODUCT_NAME.app/Contents/VComponents
#ln -s /Library/Frameworks/V4CC.framework/Versions/A/Resources/ 
libvkernel_fat_release.dylib $BUILT_PRODUCTS_DIR/$PRODUCT_NAME.app/ 
Contents/VComponents/

Ran it once on building, 2nd time build failed, added in comments as  
above, rebuild worked, but crash still happening.  Do I need to  
define those variables somewhere that are in the build script or are  
those standard globally? available?

Justin:  I realize this is not your job, you are a busy developer,  
and do not feel comfortable asking for your time to deal with this.   
Perhaps I should continue to study the 2 books on Xcode I have here  
before having you look at my project and source, so that maybe I can  
find the problem myself.  Plus I can wait until Ruslan et al. get  
more examples done.

I did have a quick design question though.  You have a Valentina  
Cursor, and you feed it to an Array controller so you can use  
bindings to feed the tableview.  Does that mean the data is being fed  
into the cursor plus also into an array for the array controller?   
Wouldn't it be faster / less memory if it were possible to have the  
cursor and the tableview connect to each other directly without the  
addition of the array?  Or is bindings just such a great thing the  
additional overhead (if such exists, I may just not be understanding  
how things work) is worth it?

In RealBasic, I connect a random Valentina Cursor to an Einhugur  
DataGrid (it is a plugin grid that seems to work similarly to  
NSTableView - requesting the number of rows and what to put in each  
row when it needs it).  But since Valentina cursors allow random  
access I can connect them directly without loading any array...

--Dave





__________________________________________
Dave Parizek


On May 31, 2006, at 6:50 PM, Justin Drury wrote:

> Hey Dave, what does the crash log say?  Did you execute the run  
> script to do the sym link to vkernel lib?
>
> If you like zip and send me the project and source on your drive  
> I'll take a look
>
> justin
>
> On 31-May-06, at 9:32 PM, Dave Parizek wrote:
>
>> I downloaded and installed Ruslan's Cocoa example and it built and  
>> ran fine.  Then I got Justin's excellent TableView example, made  
>> changes in where things were (as instructed), and it built and ran  
>> fine.  But now I try to re-run Ruslan's example and something must  
>> be broken - I get the error "EXC_BAD_ACCESS".  It builds but  
>> crashes when running.
>>
>> As a Cocoa newbie I understand what all I need to do to code for  
>> Valentina (sort of at least) but I do not understand all this  
>> discussion of where things need to be so xcode can see them.  Is  
>> the above error caused by changing the locations of needed  
>> framework files?
>>
>> Or have I messed something up:  googling this error suggests it is  
>> a memory management issue:
>>
>> "EXC_BAD_ACCESS"
>> This error usually is caused because you refer to something that has
>> already been deallocated. Is can often happen if you forget to retain
>> an object that was autoreleased when it was created, and you try to
>> access it too late, i.e. after the pool has cleaned stuff up. It can
>> also happen if you release something more than you should, i.e. you
>> release an object that you did not own.  This is a good read to start
>> from:
>> http://www.stepwise.com/Articles/Technical/HoldMe.html
>>
>>
>> --Dave
>> __________________________________________
>> Dave Parizek
>>
>>
>> On May 17, 2006, at 3:21 AM, Justin Drury wrote:
>>
>>> Pros for /Library/Frameworks/V4CC.Framework
>>> •Contains snapshot of Valentina Release, everything is  
>>> contained.  (The VComponents are contained in the framework and  
>>> have had their names changed already. See bottom of email)
>>> •Easily added to xcode project
>>> •small application sizes(multiple apps link to the framework)
>>> •Apps can be updated to use new V4CC framework without recompiling 
>>> (see below #1)
>>>
>>> Con's
>>> •10.4u SDK sym link workaround(one time hit)
>>> •(#1)existing API 's shouldn't change, otherwise older apps  
>>> linking to the framework will crash(that method no longer exists)
>>> •That darn sym link in the application's package to libvkernel  
>>> (Hopefully you guys can fix that soon)
>>>
>>> ---------------------
>>> Pros for @executable_path/../Frameworks
>>> •Self contained application, no "install" necessary
>>> •Freedom to change API.  Application is snapshot of a particular  
>>> time.
>>> •I suppose you could swap out the VComponents folder inside an  
>>> app to update it.
>>>
>>> Cons
>>> •Larger app size
>>> •Requires post flight script to use install_name_tool to change  
>>> VComponents to @executable_path
>>> •To use XCode with framework requires drag of V4CC.framework into  
>>> XCode project then all VComponents(framework cannot contain the  
>>> vcomponents in this instance), then setting up copy phases in  
>>> XCode to copy the V4CC.Framework into  Frameworks, and then  
>>> setting up the VComponents tree(yeach!)
>>>
>>>
>>> RUSLAN: Your XCode Project for V4CC, does it have a copy files  
>>> phase where it copies each of the VComponents into the Framework 
>>> (I was using Resources before), and did those files have the  
>>> following script run on it?  If not then you are just building a  
>>> framework that links against /usr/local/lib/vcomponents.  Nothing  
>>> wrong with that, its just not self contained... And a user now  
>>> has stuff in 3 places (the application itself, usr/local/lib/ 
>>> vcomponents and /Library/Frameworks)
>>>
>>> # change id of data library
>>> 	
>>> 	cd /usr/local/lib/vcomponents/
>>> 	install_name_tool -id "/Library/Frameworks/V4CC.framework/ 
>>> Versions/A/Resources/libicudata.dylib" libicudata.dylib
>>> 	install_name_tool -id "/Library/Frameworks/V4CC.framework/ 
>>> Versions/A/Resources/libicuuc.dylib" libicuuc.dylib
>>> 	install_name_tool -change "/usr/local/lib/vcomponents/ 
>>> libicudata.dylib" "/Library/Frameworks/V4CC.framework/Versions/A/ 
>>> Resources/libicudata.dylib" libicuuc.dylib
>>> 	install_name_tool -id "/Library/Frameworks/V4CC.framework/ 
>>> Versions/A/Resources/libicui18n.dylib" libicui18n.dylib
>>> 	install_name_tool -change "/usr/local/lib/vcomponents/ 
>>> libicudata.dylib" "/Library/Frameworks/V4CC.framework/Versions/A/ 
>>> Resources/libicudata.dylib" libicui18n.dylib
>>> 	install_name_tool -change "/usr/local/lib/vcomponents/ 
>>> libicuuc.dylib" 	"/Library/Frameworks/V4CC.framework/Versions/A/ 
>>> Resources/libicuuc.dylib" libicui18n.dylib
>>> 	install_name_tool -id "/Library/Frameworks/V4CC.framework/ 
>>> Versions/A/Resources/libicuio.dylib" libicuio.dylib
>>> 	install_name_tool -change "/usr/local/lib/vcomponents/ 
>>> libicuuc.dylib" 	"/Library/Frameworks/V4CC.framework/Versions/A/ 
>>> Resources/libicuuc.dylib" libicuio.dylib
>>> 	install_name_tool -change "/usr/local/lib/vcomponents/ 
>>> libicudata.dylib" "/Library/Frameworks/V4CC.framework/Versions/A/ 
>>> Resources/libicudata.dylib" libicuio.dylib
>>> 	install_name_tool -change "/usr/local/lib/vcomponents/ 
>>> libicui18n.dylib" "/Library/Frameworks/V4CC.framework/Versions/A/ 
>>> Resources/libicui18n.dylib" libicuio.dylib
>>>
>>>
>>> #####################################
>>>
>>> 	# change id of VSHARED
>>> 	install_name_tool -id "/Library/Frameworks/V4CC.framework/ 
>>> Versions/A/Resources/libvshared_fat_release.dylib"  
>>> libvshared_fat_release.dylib
>>> 	install_name_tool -id "/Library/Frameworks/V4CC.framework/ 
>>> Versions/A/Resources/libvkernel_fat_release.dylib"  
>>> libvkernel_fat_release.dylib
>>> 	install_name_tool -change "/usr/local/lib/vcomponents/ 
>>> libvshared_fat_release.dylib" 	  "/Library/Frameworks/ 
>>> V4CC.framework/Versions/A/Resources/libvshared_fat_release.dylib"  
>>> 		libvkernel_fat_release.dylib
>>> 	install_name_tool -change "/usr/local/lib/vcomponents/ 
>>> VSDK.framework/Versions/A/VSDK" "/Library/Frameworks/ 
>>> V4CC.framework/Versions/A/Resources/VSDK.framework/Versions/A/ 
>>> VSDK" 	libvkernel_fat_release.dylib
>>> 	install_name_tool -change "/usr/local/lib/vcomponents/ 
>>> libicudata.dylib" "/Library/Frameworks/V4CC.framework/Versions/A/ 
>>> Resources/libicudata.dylib" 	libvkernel_fat_release.dylib
>>> 	install_name_tool -change "/usr/local/lib/vcomponents/ 
>>> libicuuc.dylib" 	"/Library/Frameworks/V4CC.framework/Versions/A/ 
>>> Resources/libicuuc.dylib" 	libvkernel_fat_release.dylib
>>> 	install_name_tool -change "/usr/local/lib/vcomponents/ 
>>> libicui18n.dylib" "/Library/Frameworks/V4CC.framework/Versions/A/ 
>>> Resources/libicui18n.dylib" 	libvkernel_fat_release.dylib
>>> 	install_name_tool -change "/usr/local/lib/vcomponents/ 
>>> libicuio.dylib" 	"/Library/Frameworks/V4CC.framework/Versions/A/ 
>>> Resources/libicuio.dylib" 	libvkernel_fat_release.dylib
>>>
>>>
>>> 	# change id of VCLIENT
>>> 	install_name_tool -id "/Library/Frameworks/V4CC.framework/ 
>>> Versions/A/Resources/libvclient_fat_release.dylib"  
>>> libvclient_fat_release.dylib
>>> 	install_name_tool -change "/usr/local/lib/vcomponents/ 
>>> libvshared_fat_release.dylib" "/Library/Frameworks/V4CC.framework/ 
>>> Versions/A/Resources/libvshared_fat_release.dylib"  
>>> libvclient_fat_release.dylib
>>> 	
>>> 	cd VSDK.framework/
>>> 	install_name_tool -id "/Library/Frameworks/V4CC.framework/ 
>>> Versions/A/Resources/VSDK.framework/Versions/A/VSDK" VSDK
>>> 	
>>>
>>>
>>> _______________________________________________
>>> Valentina-beta mailing list
>>> Valentina-beta at lists.macserve.net
>>> http://lists.macserve.net/mailman/listinfo/valentina-beta
>>
>
> _______________________________________________
> Valentina-beta mailing list
> Valentina-beta at lists.macserve.net
> http://lists.macserve.net/mailman/listinfo/valentina-beta



More information about the Valentina-beta mailing list