Recipe management software?

For everything that's not in any way related to PureBasic. General chat etc...
User avatar
Fangbeast
PureBasic Protozoa
PureBasic Protozoa
Posts: 4747
Joined: Fri Apr 25, 2003 3:08 pm
Location: Not Sydney!!! (Bad water, no goats)

Re: Recipe management software?

Post by Fangbeast »

If I get time tomorrow, i'll upload the latest project as a big, stinking heap of bugs have been fixed by me and things added thanks to master RASHAD.

https://www.dropbox.com/sh/pqj0fi4g4nuz ... LnOMa?dl=0

----------------
29/05/2016
----------------

Added: Database and program statistics window, keyboard and menu shortcuts for the default system database. If you change databases, the statistics for that database will be the ones shown after the next shutdown.

----------------
28/05/2016
----------------

Added: Missing keyboard shortcut detection for "Delete after import"
Added: Warning when turning on "Delete after import" as it's a dangerous function
Added: Sorting of shopping list items on drop or edit.
Added: Nice right and left margins for printed help text.
Added: Printing of the shopping list items. Still a work in progress.

Fixed: Wrong window message was being processed for edited shopping list item so no saving occurred.
Fixed: Shopping item columns were mixed up in the display, in the wrong order.
Fixed: Shopping item columns were mixed up in a lot of other modules other than just display.
Fixed: Cost field wasn't being updated at the bottom of the shopping form.
Fixed: Alphabetic sorting of displayed shopping items wasn't case insensitive so the order was wrong.
Fixed: Forgot to free a critical font in the keyboard shortcuts printing routine.

Removed: More redundant code.

----------------
27/05/2016
----------------

Changed: The printing of the keyboard shortcuts has been completely redesigned to be clear, consistent and easy to read. Unlike the rest of the program, it uses Arial as it looks better on a printed form. Big job. Jumbuck/Reg
Changed: The colour banding is not allowed when printing the keyboard shortcuts list. Looked awful.

Fixed: 3 missing keyboard shortcuts in the keyboard shortcuts list that somehow had been missed so their keys were missing in the list.

Added: A 10 pixel gutter on the left and the right of the help page editor. looked bad pressed right up against the edges.

Removed: Redundant procedures belonging to EditableListIconGadget, not used any more.

----------------
24/05/2016
----------------

Added: Printing from the help pages. All help page text can be sent to your default system printer. From RASHAD.

----------------
18/05/2016
----------------

Added: Missing ENTER key to start searching help file. Must have a consistent interface!

----------------
17/05/2016
----------------

Changed: The category bar heading now changes to the current category in case a non empty causes the highlight to jump to the first item.
Changed: In the search fields of the main and advanced forms, the field names are more anglicised rather than concatenated. More readable.

Added: Delimiter characters to the category and title headings to draw your eye to the current category and or cookbook being used.
Added: You can now edit and save your chosen keyboard shortcuts from the keyboard shortcut list screen rather than the defaults.
Amateur Radio, D-STAR/VK3HAF
User avatar
Fangbeast
PureBasic Protozoa
PureBasic Protozoa
Posts: 4747
Joined: Fri Apr 25, 2003 3:08 pm
Location: Not Sydney!!! (Bad water, no goats)

Re: Recipe management software?

Post by Fangbeast »

Anyone have any suggestions or requests? Bug fixes?? Additions?
Amateur Radio, D-STAR/VK3HAF
User avatar
Fangbeast
PureBasic Protozoa
PureBasic Protozoa
Posts: 4747
Joined: Fri Apr 25, 2003 3:08 pm
Location: Not Sydney!!! (Bad water, no goats)

Re: Recipe management software?

Post by Fangbeast »

Okay, I am freezing any further work on this until I can figure out if I can re-engineer this into a multi-language application without making it too complicated or stuffing it up (what I always do!!) unless people have some more ideas for me.
Amateur Radio, D-STAR/VK3HAF
Mistrel
Addict
Addict
Posts: 3415
Joined: Sat Jun 30, 2007 8:04 pm

Re: Recipe management software?

Post by Mistrel »

Five years later. How many recipes do you have now?? :D
User avatar
Fangbeast
PureBasic Protozoa
PureBasic Protozoa
Posts: 4747
Joined: Fri Apr 25, 2003 3:08 pm
Location: Not Sydney!!! (Bad water, no goats)

Re: Recipe management software?

Post by Fangbeast »

Mistrel wrote:Five years later. How many recipes do you have now?? :D
600,000
Amateur Radio, D-STAR/VK3HAF
User avatar
doctorized
Addict
Addict
Posts: 854
Joined: Fri Mar 27, 2009 9:41 am
Location: Athens, Greece

Re: Recipe management software?

Post by doctorized »

Tried to run the app under PB 5.50 x86 and I got error: "Line 72: Invalid name: same as a command (from library 'String')" for file Recipes_MyDeclarations.pb.
User avatar
Fangbeast
PureBasic Protozoa
PureBasic Protozoa
Posts: 4747
Joined: Fri Apr 25, 2003 3:08 pm
Location: Not Sydney!!! (Bad water, no goats)

Re: Recipe management software?

Post by Fangbeast »

doctorized wrote:Tried to run the app under PB 5.50 x86 and I got error: "Line 72: Invalid name: same as a command (from library 'String')" for file Recipes_MyDeclarations.pb.
I'm currently studying so can't help you much but the procedure that I use on that line "FormatNumber" exists probably as an internal command in the 5.5x series of compiler so you will have to search for and rename it throughout the code.

I didn't use it in many locations so it should be a very short fix.

Don't use 5.5, still on 5.42 as it does what I need.
Amateur Radio, D-STAR/VK3HAF
Neil
Enthusiast
Enthusiast
Posts: 198
Joined: Wed Feb 29, 2012 8:04 am
Location: Melbourne, AUS

Re: Recipe management software?

Post by Neil »

Hi Fangbeast,

Renamed all FormatNumber (12 Locations) but now get error:

[15:33:43] Waiting for executable to start...
[15:33:43] Executable type: Windows - x64 (64bit, Unicode)
[15:33:43] Executable started.
[15:33:43] [ERROR] _FB_OwnerDrawComboFonts.pbi (Line: 66)
[15:33:43] [ERROR] The specified #Image is not initialised.
[15:34:20] The Program was killed.

Line 66 is :

ImageList_AddMasked_(himlFontType, ImageID(0), #Yellow)

Neil

Edited:

I just commented out that line and app compiled ok - very impressive !!
User avatar
Fangbeast
PureBasic Protozoa
PureBasic Protozoa
Posts: 4747
Joined: Fri Apr 25, 2003 3:08 pm
Location: Not Sydney!!! (Bad water, no goats)

Re: Recipe management software?

Post by Fangbeast »

My code is a load of steaming crap Neil. A bit like srod's underpants or Idle's painfully abused sheep. Slow, horrible and full of bugs!!!

I'm not using 5.5 but the problem is with this block of code. Specifically, the UseJCALG1Packer() that was still allowed in 5.42 but depreciated and not recommended.

Code: Select all

UseJCALG1Packer()
Define *lpBuffer
; Load packed image from memory
*lpBuffer = AllocateMemory(406)
UncompressMemory(?FontType, ?FontTypeEnd - ?FontType, *lpBuffer, MemorySize(*lpBuffer), #PB_PackerPlugin_JCALG1)
CatchImage(0, *lpBuffer)
FreeMemory(*lpBuffer)
; Create ImageList
himlFontType = ImageList_Create_(16, 12, #ILC_MASK, 0, 0)
; 
ImageList_AddMasked_(himlFontType, ImageID(0), #Yellow)
In the datasection, it is attempting to load a default image type to represent the TrueType font loaded in the combobox when editing instructions but it's failing to load because I suspect that packer doesn't work in 5.5 or not working correctly and no image is returned so the compilation fails at CatchImage(0, *lpBuffer) because there is no image.

There is in 5.42 but not in 5.5.

I'm sorry I don't have time to debug this due to studies (and I don't use 5.5) but you could add various debug checks to a: tell you if the buffer was created, check if UncompressMemory returned data, check if CatchImage caught an image.

Also change the hardcoded image number to use PB_ANY.
Amateur Radio, D-STAR/VK3HAF
Neil
Enthusiast
Enthusiast
Posts: 198
Joined: Wed Feb 29, 2012 8:04 am
Location: Melbourne, AUS

Re: Recipe management software?

Post by Neil »

Hi Fangbeast,

Thanks for your detailed reply - but sorry, I didn't understand any of that !!

But as I said in my edit though - I just commented out this line and everything seemed to work.

Code: Select all

ImageList_AddMasked_(himlFontType, ImageID(0), #Yellow)
By the way, I did a search and couldn't find another occurrence to "#Yellow" in any of the files!!

Cheers,

Neil
User avatar
Fangbeast
PureBasic Protozoa
PureBasic Protozoa
Posts: 4747
Joined: Fri Apr 25, 2003 3:08 pm
Location: Not Sydney!!! (Bad water, no goats)

Re: Recipe management software?

Post by Fangbeast »

Thanks for your detailed reply - but sorry, I didn't understand any of that !!
That makes two of us most days!!!
But as I said in my edit though - I just commented out this line and everything seemed to work.
Maybe so, but it could cause font issue somewhere down the line.

Code: Select all

ImageList_AddMasked_(himlFontType, ImageID(0), #Yellow)
By the way, I did a search and couldn't find another occurrence to "#Yellow" in any of the files!!
It's not the #Yellow that could cause a problem (It is an inbuilt constant in PB) but the ImageID(0) stemming from the fact that UseJCALG1Packer() may not be working the way it did in PB 5.42.

I'll see if I get a moment on the weekend to look at it.
Amateur Radio, D-STAR/VK3HAF
User avatar
Keya
Addict
Addict
Posts: 1891
Joined: Thu Jun 04, 2015 7:10 am

Re: Recipe management software?

Post by Keya »

how do you load the recipes? i downloaded the three 7z files and extracted, running recipes.pb and then selected Open Database in the Recipes app to open the recipes.sqlite file, but nothing seems to happen, i cant see any recipes, and while it says it loaded the file it also says 0 recipes ... ?
Image
User avatar
Fangbeast
PureBasic Protozoa
PureBasic Protozoa
Posts: 4747
Joined: Fri Apr 25, 2003 3:08 pm
Location: Not Sydney!!! (Bad water, no goats)

Re: Recipe management software?

Post by Fangbeast »

how do you load the recipes? i downloaded the three 7z files and extracted, running recipes.pb and then selected Open Database in the Recipes app to open the recipes.sqlite file, but nothing seems to happen, i cant see any recipes, and while it says it loaded the file it also says 0 rec

Why are you picking on my poor brain?? I don't even remember the 3 files, it was ages ago. ?
Normal procedure for a NEW run of the recipe program is:

1. Run recipe manager and it creates a BLANK database with 0 recipes. This is a default database that the program always starts up with. You can always open another .sqlite file and it it contains recipes, the display will reinitialise, the list will be loaded and the counter will reflect the number of recipes shown.

2. Import any of the supported recipe types and as you do, they are added to the visible list to let you know they are going in and the counter at the bottom will reflect how many are being imported.

What was the extension of the 3 files you mentioned? I don't remember what they were or where I put them
Amateur Radio, D-STAR/VK3HAF
User avatar
Keya
Addict
Addict
Posts: 1891
Joined: Thu Jun 04, 2015 7:10 am

Re: Recipe management software?

Post by Keya »

ah! i was opening the empty sqlite one not the one id extracted (same name + Mondayitis)
What was the extension of the 3 files you mentioned? I don't remember what they were or where I put them
7z, in your last link at the top of this page

btw your Recipes app would be a great place for a little utility to calculate cooking times :)

Code: Select all

;// Config
recipe.s = "Roast Chicken"  ;// Cook for 20-25 mins per 500gm @ 180C
mintime   = 20   ;mins
maxtime   = 25   ;mins
perweight = 500  ;gms

;// Item
weight.f  = 1350 ;gms (weight of item to cook)
Debug "Cook " + Str(weight) + "gms for " + StrF((weight / perweight) * mintime,2) + 
       " to " + StrF((weight / perweight) * maxtime,2) + " mins"

;= "Cook 1350gms for 54.00 to 67.50 mins"
User avatar
Fangbeast
PureBasic Protozoa
PureBasic Protozoa
Posts: 4747
Joined: Fri Apr 25, 2003 3:08 pm
Location: Not Sydney!!! (Bad water, no goats)

Re: Recipe management software?

Post by Fangbeast »

Damn and blast, I totally forgot that was still there. Have deleted all the dropbox links as they are way out of date.

From now on, always go to http://members.westnet.com.au/bangfeast for the latest (or oldest) version of my stuff and I'll pack up some importable recipes tonight and put into DropBox as my web account doesn't have the space.

I have so many recipes now and get more every day but haven't worked on the software in ages as I am working on the home inventory.

Will get back to it soon.
Amateur Radio, D-STAR/VK3HAF
Post Reply