Bundle or ? to store data in txt, csv or sqlite ?

  1. 3 months ago

    Emile S

    Jul 11 Europe (France, Strasbourg)

    I want to add a new feature to a project: the ability to display a small Image / Photo related to the current line (when clicked in a Cell / displayed in a wndow, probably).

    No problem, easy, etc.

    But when the implementing time comes, sometimes we can have surprises: the idea was to put the images / photos, etc. in a folder called Images.

    But it is impossible to have more than a folder with the same name in the same location: doh !

    No problem, I will use a Bundle !

    But a bundle does not exists on Windows / Linux.

    I may store the Images / Photos, etc. in the data base and forget about .txt and .csv…

    All of a sudden, the idea of this feature is less sexy.

    What do you think ?
    What will you do if this is your own project (in that kind of case) ?

  2. Dave S

    Jul 11 San Diego, California USA

    SQLITE... either a blob or a textencoded image

  3. nicolás c

    Jul 11 Pre-Release Testers, Xojo Pro

    translate.google.com-> I personally do not understand what you want to do. Maybe it's a language issue? Can you explain it in another way?

  4. nicolás c

    Jul 11 Pre-Release Testers, Xojo Pro

    But it is impossible to have more than a folder with the same name in the same location: doh !

    what about save all the images in one folder, each one with its unique name/identifier? (sorry if i misunderstood the problem)

  5. Emile S

    Jul 11 Europe (France, Strasbourg)
    Edited 3 months ago

    Here’s a screen shot (alpha) of the window. This will gives you a better idea of what I have done. The only question is how will I store the covers (magazine cover).

    In this window case, the text data comes from a csv file / the image (magazine cover) from an Images folder. The image name is stored in the Cover field.

    Dave: so, if the user will save or open from/to txt/csv, the feature will not be available.

    -image-

    Edit: the magazine comes from Australia.

  6. Dave S

    Jul 11 San Diego, California USA

    @Emile S Dave: so, if the user will save or open from/to txt/csv, the feature will not be available.

    If the data is already stored.... what difference would it make?
    It seems your task was already done for you

  7. Emile S

    Jul 11 Europe (France, Strasbourg)

    @Dave S what difference would it make?

    The cover (or the product photo or…) is not displayed to the user…

    I get an idea: what if I store the images in a folder that uses the csv, txt or sqlite name ?

    So, no name collision: an item and a folder can share the same name.

    Thank you all.

  8. nicolás c

    Jul 11 Pre-Release Testers, Xojo Pro

    sorry, i don't fully understand what the problem is

  9. Emile S

    Jul 11 Europe (France, Strasbourg)

    Imagine a list of parts number or object in a shop stored in a txt, csv or sqlite file and a photo to match and display in a window (as above). How do you do that ?

    The original idea was to store the photo (or image) in a folder called Images. The final idea is to use the same name for both the liat and the folder.

    Is it clear now ?

    BTW: the file name is stored in a Column (I named it Cover, but this may change).

  10. nicolás c

    Jul 11 Pre-Release Testers, Xojo Pro
    Edited 3 months ago

    what "liat" means?

  11. Thom M

    Jul 11 Pre-Release Testers Greater Hartford Area, CT

    Use a zip archive maybe?

  12. Emile S

    Jul 11 Europe (France, Strasbourg)

    @nicoláscanessa what "liat" means?

    list, a typo.

    @Thom M Use a zip archive maybe?

    That is an answer. Implementation will take far more time.

  13. Jeff T

    Jul 11 Pre-Release Testers Midlands of England, Europe

    If the list of images is static, why not host them on a website and download them on demand?
    If they are static, then a zip archive would take you an hour to add, maximum.

    Drag the zip to your project.
    Access it from the resources folder at run time.
    Tempel has zip functions, MBS has zip functions, both allow you to get one file out of a zip file on demand.
    if all else fails you can call to the OS and unzip the zip file into documents.child(yourapp).child(images) at startup

or Sign Up to reply!