Page 1 of 1

some questions about browse

Posted: Tue Dec 08, 2015 10:49 pm
by plantenkennis
Hello,

I am able to build a program with a browse, but i have a few questions.

1. Is it possible to change the fontcolor for specific rows. When a plantID is ending on 0 fontcolor black and if plantID is ending on 1 fontcolor grey. PlantID is a field in the table

2. When the browse is active I can scroll using keys, but if I try to scroll with my mouse the app crashes with the following message:
Unrecoverable error 9015: Symbol item expected from hb_vmDo()
Called from DBSKIP(0)
Called from TWBROWSE:GETVALUE(276) in source/classes/browse.prg
Called from TWINDOW:HANDLEEVENT(592) in source/classes/window.prg
Called from _FMH(676) in source/classes/window.prg
Called from TWINDOW:FINDCONTROL(434) in source/classes/window.prg
Called from TWINDOW:HANDLEEVENT(514) in source/classes/window.prg
Called from _FMH(676) in source/classes/window.prg
Called from WNDRUN(0)
Called from TWINDOW:ACTIVATE(266) in source/classes/window.prg

3. Is it possible to change the app icon. Now it is allways the FiveMac eye, but I want to use my own icon.

Rene

Re: some questions bout browse

Posted: Wed Dec 09, 2015 8:07 pm
by Antonio Linares
Rene,

1. Currently we are able to set alternate colors for the browse rows. In samples/fileman.prg there is an example:

Code: Select all

   oBrwLeft:SetColorsForAlternate( nRGB( 0xAA, 0xFF, 0xFF ), nRGB( 0x66, 0xAA, 0xFF ) )   
   oBrwLeft:SetAlternateColor( .T. )
We are looking for a way to change the color of the text of some rows

2. I just tested samples/fileman.prg and the mouse wheel is working fine on the browses. If the scrollbar is not shown
then it does not work. Could you please test fileman.prg there and let me know if it works fine for you ?

3. In samples/build.sh we set here the icon to use:

echo ' <key>CFBundleIconFile</key>' >> $1.app/Contents/Info.plist
echo ' <string>fivetech.icns</string>' >> $1.app/Contents/Info.plist

You can specify there a different icns file for your app

Re: some questions bout browse

Posted: Thu Dec 10, 2015 5:47 am
by plantenkennis
Hello Antonio,

Thanks for your reply. I have studied fileman and fivedbu for help. With the commands given, I can only change the colors line by line. So one line is lightblue the next is darkerblue. Can I manage which lines are colored?.
I have tested fileman and browse and there I can scroll using the mouse. The error given doesn't give any clou to look for?
René

Re: some questions bout browse

Posted: Thu Dec 10, 2015 7:28 am
by Antonio Linares
Rene,

Please email me your PRG so I can test it, thanks

Re: some questions about browse

Posted: Thu Dec 10, 2015 11:07 am
by Antonio Linares
Already implemented:

Image

I am emailing you the new libraries. This is an example of how to use it:

Code: Select all

oBrw:bClrText = { | pColumn, nRowIndex | ColorFromNRGB( If( nRowIndex % 2 == 0, CLR_RED, CLR_GREEN ) ) }

Re: some questions about browse

Posted: Thu Dec 10, 2015 7:08 pm
by plantenkennis
Hello Antonio,

THANK YOU for the very quick implementation. I will test this tomorrow and sent you my source for the scroll problem. I will make a few smal tables for testing

René

Re: some questions about browse

Posted: Fri Dec 11, 2015 3:54 pm
by plantenkennis
Hello Antonio,

Thanks for the new libs. I have tested it and te font coloring works great.
I was not able to change the icon of the program. I use make to build my app, so does changing the build.sh file work in this case.

And how can I include all icons in my app, the same as a .rc file in Windows?

Re: some questions about browse

Posted: Thu Jan 14, 2016 6:52 am
by Antonio Linares
An OSX app is in fact a zip file renamed as app, so in OSX finder right click on your app and select "show contents" and inside
the app is where you have to use a folder named Resources and there you have to store your icns and other resources.

Also there is a Info.plist that you can edit using TextEdit and set the right values for your app.