Carbon to Cocoa produces NilObjectExceptions help

Trying to update to Cocoa (RealStudio to XoJo) getting NilObjectExceptions with no clue where there coming from
the OSX/PC project allows the user to locate/define a file folder read/write its contents into a SQLite database reads db into an array,
listbox celltags, rowtags, check boxes etc.

runs without error using carbon framework

I can’t be the first one to have this problem

do I have to put Catch err As NilObjectException, msgbox “err” code after every folderitem statement?
or does XoJo provide an easier way to test for this?
perhaps a conversion process maybe?

HELP!

Have you identified what section of code is causing the error?

Are you using ShellPath? or NativePath?

More information from you will result in more accurate information from us :slight_smile:

If you have “break on exceptions” turned on in the IDE, when you run the project the debugger should stop on the NOE. Post that code here and someone should be able to help.

Hey Dave,

Have you identified what section of code is causing the error?
well finally got app to run but with anomalous behavior
well if i run app using carbon framework and define folders create preferences etc
it loads and will open my preferences window
but startup option to open preferences window at startup fails with
“An unhandled NilObjectException has occurred. Please report this error to the developer”
message.

Are you using ShellPath? or NativePath?
no using AbsolutePath, CreationDate, DisplayName

@Roger Bejarano tried that to no avail

sorry wrong Roger
@Roger Clary tried that to no avail

Just noticed there is no AbosolutePath in xojo what is replacement of OSX?

I believe that NativePath is now the way to go

NativePath cant be correct the system drive is missing and the delimiter is / not :

Only said that due to the fact that a number of times while converting my Carbon apps to Cocoa I was told to use NativePath in place of Absolute Path when doing a check of the code and looking at the items marked as deprecated. But, I rarely enter paths. I usually start with special folder and then go the Child route to get to the final destination. Allows me to verify everything exists along the path, and if not, create it. Your needs may differ.

Thanks for your insight Harry
AbosolutePath while deprecated, still works… not causing the NilObjectExceptions

Showing the code you are using would go a long way towards helping others help you otherwise we have zip to go on.

@Harrie Westphal
yea figured that, was really hoping there was a conversion tool.
I forgot I programmed message flags I just enabled those and found my Problem
just need to clone context menus
Problem solved
thanks to all who helped!