User Tag List

Results 1 to 8 of 8

Thread: default data with the ini object?

  1. #1
    Clicker Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleSWF Export ModuleXNA Export ModuleUnicode Add-on
    mobichan's Avatar
    Join Date
    Oct 2007
    Location
    Buffalo, NY
    Posts
    3,274
    Mentioned
    26 Post(s)
    Tagged
    0 Thread(s)

    default data with the ini object?

    Hi All,

    Is there a simple way to have a default set of data for the ini object that is only initialized if no ini file is present? I know ini++ has this feature, but I am having to use normal ini for compatability reasons.

    Mobichan

  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)
    Nifflas usually has a string setting called "Settings Created" and he checks if it is equal to "Yes". If it isn't, he sets it to Yes and sets all the default settings - otherwise the settings are left to be read by whatever events need them.
    Working as fast as I can on Fusion 3

  3. #3
    Clicker Multimedia Fusion 2 DeveloperSWF Export Module

    Join Date
    Aug 2006
    Posts
    2,335
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    One thought would be to do a manual search for the file first, if it's not found create it and then do a loop etc to fill it with the data you want.

    Another way would be to binary store a already created ini and then do a search and unpack it to the folder needed etc.

  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)
    You should never over complicate simple tasks

  5. #5
    Clicker Multimedia Fusion 2 DeveloperSWF Export Module

    Join Date
    Aug 2006
    Posts
    2,335
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Depends on the projects complexity and the amount of data stored, if there was a lot of things then binary unpack might be a better/faster option than creating values with events for example. But yeah i agree

  6. #6
    Clicker Multimedia Fusion 2SWF Export Module
    Jacob's Avatar
    Join Date
    Jul 2007
    Location
    Second pixel to the right
    Posts
    3,208
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by LB View Post
    You should never over complicate simple tasks
    But that's what makes it fun!

  7. #7
    Clicker Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleSWF Export ModuleXNA Export ModuleUnicode Add-on
    mobichan's Avatar
    Join Date
    Oct 2007
    Location
    Buffalo, NY
    Posts
    3,274
    Mentioned
    26 Post(s)
    Tagged
    0 Thread(s)
    Laf. Well, I only store about 15 values and strings, so doing it with events seems the simplest way to go at this point. But I will keep in mind the Binary approach for future endeavors. Thanks for the "Nifflas approach" LB. It works great.

    Out of curiosity, how would you go about searching for the existence of a file? Which action or extension?

  8. #8
    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)
    Atom, I was talking about the over complicated task of searching for the file. Creating it from binary is worth the effort if it is large.

    Mobichan, the File object would, as its name suggests, allow you to do such a thing.
    Working as fast as I can on Fusion 3

Similar Threads

  1. Replies: 17
    Last Post: 10th July 2013, 01:46 PM
  2. Default Array \ Binary Data
    By SoftWarewolf in forum iOS Export Module Version 2.0
    Replies: 9
    Last Post: 4th December 2012, 07:15 AM
  3. GC default leaderboard shows no data
    By Shmuper in forum iOS Export Module Version 2.0
    Replies: 1
    Last Post: 16th April 2012, 01:07 PM
  4. Default Array \ Binary Data
    By SoftWarewolf in forum iOS Export Module Version 2.0
    Replies: 0
    Last Post: 1st March 2012, 11:17 PM
  5. Create default object
    By RickyRombo in forum Multimedia Fusion 2 - Technical Support
    Replies: 6
    Last Post: 22nd May 2010, 08:37 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
  •