User Tag List

Results 1 to 10 of 10

Thread: Properties and EDIF

  1. #1
    Clicker Fusion 2.5 MacFusion 2.5 DeveloperFusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleUniversal Windows Platform Export ModuleSWF Export ModuleMac Export ModuleInstall Creator Pro
    iOSC's Avatar
    Join Date
    Mar 2012
    Location
    Toronto, Canada
    Posts
    405
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Properties and EDIF

    Hey,
    I'm still working (and learning) on my extension with EDIF - runtime in objective-c.
    I tried to add a simple text property to my extension, by looking the official windows SDK templates.
    It's working well in Fusion but when I'm trying to get the value of the property at runtime entered by the user, I only get chinese characters.

    In my Common.h, under EDITDATA, I declared char sText[1]; (as in the template of official SDK).
    and in the runtime extension I'm trying to retrieve the value by using NSString *sText = [file readAString]; (as in the official button extension).
    Mmmh I'm learning, so it's still a little bit confused for me but I'm sure I'm not so far.

    I'm working with latest version of Fusion and exporters.

    Could someone help ?
    Thanks

  2. #2
    Clickteam Clickteam
    LB's Avatar
    Join Date
    Jun 2007
    Location
    Richardson, Texas, North America
    Posts
    8,937
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    You can only access the editdata when your runtime extension is constructed, after that the editdata is no longer available. You have to get anything you need from the editdata into your runtime data before it is destroyed.

  3. #3
    Clicker Fusion 2.5 MacFusion 2.5 DeveloperFusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleUniversal Windows Platform Export ModuleSWF Export ModuleMac Export ModuleInstall Creator Pro
    iOSC's Avatar
    Join Date
    Mar 2012
    Location
    Toronto, Canada
    Posts
    405
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Sorry LB, but where/how to retrieve the value of the properties so...
    The strange thing is i can correctly retrieve the value (but not the full string, only char byte by byte) by using readAChar instead of readAString.

  4. #4
    Clickteam Clickteam
    LB's Avatar
    Join Date
    Jun 2007
    Location
    Richardson, Texas, North America
    Posts
    8,937
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    Oh, I think you are experiencing a problem with the difference between Unicode strings and non-Unicode strings.

  5. #5
    Clicker Fusion 2.5 MacFusion 2.5 DeveloperFusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleUniversal Windows Platform Export ModuleSWF Export ModuleMac Export ModuleInstall Creator Pro
    iOSC's Avatar
    Join Date
    Mar 2012
    Location
    Toronto, Canada
    Posts
    405
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    That I was thinking first but I'm wondering: since I'm using your edif, fusion 2.5 and the last version of ios exporter, it shouldn't have any problem with unicode... should it?
    And if so, how can fix it?

  6. #6
    Clickteam Clickteam
    LB's Avatar
    Join Date
    Jun 2007
    Location
    Richardson, Texas, North America
    Posts
    8,937
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    I mean on the Objective-C end, you might be trying to read as a Unicode string when it's actually a non-unicode string fixed. My fork of EDIF is updated for Unicode and such but you may need to read some of the info on the wiki:
    https://github.com/ClickteamLLC/windows-edif/wiki

  7. #7
    Clicker Fusion 2.5 MacFusion 2.5 DeveloperFusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleUniversal Windows Platform Export ModuleSWF Export ModuleMac Export ModuleInstall Creator Pro
    iOSC's Avatar
    Join Date
    Mar 2012
    Location
    Toronto, Canada
    Posts
    405
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    But why is it working well when I try with the official button extension?
    When I try to [readAString] with the official extension, it returns a correct encoded string.
    Do you think if I send you the sources you'll be able to see what's wrong?

    And I already spent hours to read the wiki, and forums...

  8. #8
    Clicker Fusion 2.5 MacFusion 2.5 DeveloperFusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleUniversal Windows Platform Export ModuleSWF Export ModuleMac Export ModuleInstall Creator Pro
    iOSC's Avatar
    Join Date
    Mar 2012
    Location
    Toronto, Canada
    Posts
    405
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    LB you were right, it was about Unicode.
    Yves helped me to solve it.

    Finally,
    - I change all strlen to _tsclen and strcpy to _tcscpy in SetPropValue
    - I declared a TCHAR instead of a char in EDITDATA, in common.h
    - I changed CPropDataValue to CPropDataString in GetPropValue as it's explained in UnicodeSDK.txt, found on the clickteam-plugin github.
    - I finally build with Edittime Unicode, instead of Edittime.

    [file readAString] in Objective-C runtime extension returns now the correct formatted text.

    BUT I'm still wondering why I had to that since I thought your EDIF will do automatically the job...
    For now, the most important is I begin to understand how work the properties.
    Thanks for the time though!

  9. #9
    Clicker Fusion 2.5 MacFusion 2.5 DeveloperFusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleUniversal Windows Platform Export ModuleSWF Export ModuleMac Export ModuleInstall Creator Pro
    iOSC's Avatar
    Join Date
    Mar 2012
    Location
    Toronto, Canada
    Posts
    405
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Another question, I read this (http://community.clickteam.com/threads/70463-EDIF-edittime)

    #define MKRS (UINT_PTR)LPCSTR
    ...
    PropData_EditString(Prop::Str, MKRS("Name"), MKRS("Description"))
    You, LB, were talking about this way of implementing properties instead of use Ext.rc and String Table.
    Using Ext.rc is not a problem, but since I'm learning, I tried the method with MKRS and guess what, the "Name" and "Description" content are displayed as chinese characters within the Frame Editor...

    Is it because this MKRS method is not supported for unicode extensions ?

  10. #10
    Clickteam Clickteam
    LB's Avatar
    Join Date
    Jun 2007
    Location
    Richardson, Texas, North America
    Posts
    8,937
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    I'm not a magician, I can't magically fix your non-unicode code to be unicode

    Did you use the Template folder or the TemplatePlus folder? The sample properties with TemplatePlus work properly:
    https://github.com/LB--/windows-edif...es.cpp#L41-L47

    The normal "Template" folder is still a WIP because James wanted to keep the original file layout alongside the one I invented.
    Working as fast as I can on Fusion 3

Similar Threads

  1. How to use non-int/text parameters in EDIF
    By Phi in forum Extension Development
    Replies: 3
    Last Post: 24th July 2012, 05:06 AM
  2. EDIF edittime
    By Phi in forum Extension Development
    Replies: 8
    Last Post: 18th April 2012, 08:51 AM
  3. EDIF Dependencies
    By Phi in forum Extension Development
    Replies: 1
    Last Post: 5th January 2012, 01:25 AM
  4. EDIF bug
    By Phi in forum Extension Development
    Replies: 7
    Last Post: 30th December 2011, 12:56 AM
  5. Interesting EDIF bug
    By Phi in forum Extension Development
    Replies: 0
    Last Post: 10th October 2011, 05:49 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •