amirrajan / rubymotion-applied

RubyMotion documentation provided by the community. Submit a pull request to the docs for a free one year indie subscription.
Apache License 2.0
49 stars 10 forks source link

macOS static constants NSAlertFirstButtonReturn, NSAlertSecondButtonReturn, NSAlertThirdButtonReturn not available #49

Closed hboon closed 6 years ago

hboon commented 6 years ago

These were available in an older version of RubyMotion (4.x or earlier probably).

Enums in the same file NSAlert.h are available, eg. NSAlertStyleWarning

I think there might have been an issue with static const in RubyMotion previously, not sure how it was handled.

Link ./build/MacOSX-10.9-Development/mLogger.app/Contents/MacOS/mLogger            
Undefined symbols for architecture x86_64:    
"_NSAlertFirstButtonReturn", referenced from:                                             
  _MREP_750A02BC00034E75BB4EF6E861E0BBA3 in app_delegate.rb.o                           
ld: symbol(s) not found for architecture x86_64                                             
amirrajan commented 6 years ago

Will be fixed in RM 5.4 (planning on releasing that this week).

Edit: wrote wrong version number. Edit: Xcode 9.1 dropped just now. Rebuilding.

digitalmoksha commented 6 years ago

@amirrajan this is still failing for me, using RM 5.4

screen shot 2017-11-06 at 1 25 06 pm

I have a sample project that demonstrates the issue: https://github.com/digitalmoksha/rm_osx_test

amirrajan commented 6 years ago

@hboon is it failing for you still too?

digitalmoksha commented 6 years ago

This works now for me in RM 5.5.

hboon commented 6 years ago

@amirrajan working for me in 5.5. Thanks for the fix! (Sorry, just back from holidays).