Page 1 of 2

Idiot STILL needs help :)

Posted: Mon Jul 19, 2021 2:17 pm
by BruceN
Please see my earlier post.

Roger said he'd give me a hand, but I guess he's been too busy (which I fully understand.)

If someone else would like to assist out of the goodness of their heart - GREAT.

If not, and you'd like a few bucks for your effort - I have no problem with that, just let me know how much.

email me, please....

thanks....

bruce

Re: Idiot STILL needs help :)

Posted: Tue Jul 20, 2021 1:26 am
by Eugene Lutsenko
As a programmer, I am no different from you in anything. But maybe you can use the solutions that I used when processing graphics. I made extensive use of Roger's help. It seems to me that fox databases should be used to store images. The solutions themselves are here:
http://lc.kubagro.ru/__AidosALL.txt
http://rocket2009.byethost22.com/Crypton.rar

Re: Idiot STILL needs help :)

Posted: Wed Jul 21, 2021 7:48 am
by rdonnay
Sorry, I got real busy the past 2 weeks. That comes to an end on Friday.

I can help you on Friday.

Re: Idiot STILL needs help :)

Posted: Wed Jul 21, 2021 9:12 am
by BruceN
I understand and appreciate your offer. I did take my code and make it compilable (attached.)

As I said, I understand logic pretty well, am pretty good working with DBF files, but have no real knowledge of programming 'infrastructure'. I block and copy code that works and modify it for my needs. This runs, but doesn't do at all what I need :)

I'll email you my phone number in case you want to call, let me know what time and I'll make sure I'm home and free.

As an aside, I live on the northshore of Lake Pontchartrain by New Orleans. It's about a 40 minute ride to the french quarter if you don't hit bad traffic. If you ever want to visit New Orleans, wife and I would love to have you stay at our house :)

http://ftp.ezpos.com/tony.txt

Re: Idiot STILL needs help :)

Posted: Sat Jul 24, 2021 9:30 am
by BruceN
Roger:

Mucho Thankso for your help Friday. I'm almost there :)

One small thing I overlooked and one small problem:

- (oversight) The 'exit' button won't work with the ID entry field blank. We have that it can't be blank in the VALID and in the KEYBLOCK. Exit needs to work at any time.

- (problem) When I click the 'print' button, it does my function (for now just a msgbox), but doesn't set focus to the 'next' button (ID NEXTBUTT.) Focus stays on print button.


Here's the 2 code sections, the whole compilable prg is the link

// ID entry
@ 1.5, 18 dcget p_id;
GETID 'PID';
TABSTOP;
PICT '@!' ;
KEYBLOCK {|n,x,o|IIF(n=xbeK_ENTER .AND. !Empty(o:get:buffer),PostAppEvent(xbeP_KillInputFocus,,,o),nil)} ;
VALID {|| !empty(p_id) };
LOSTFOCUS {|| p_lkup(p_id, @qty, @dscr, @show), DC_GetRefresh(GetList), SetAppFocus(DC_GetObject(Getlist,'NEXTBUTT')) }

// closes app
@ 7, 28 DCPUSHBUTTON CAPTION 'E~xit' SIZE 9,1.2;
ACTION {||DC_ReadGuiEvent(DCGUI_EXIT_OK,GetList)};
ID 'EXITBUTT';
TABSTOP;
ACCELKEY xbeK_ALT_X

--------------
// prints 1 label, sets focus to NEXTBUTT
@ 7, 19 DCPUSHBUTTON CAPTION '~Print' SIZE 9,1.2;
ACTION {|| msgbox('Label Printed'), SetAppFocus(DC_GetObject(Getlist,'NEXTBUTT')) };
ID 'PRINTBUTT';
TABSTOP;
ACCELKEY xbeK_ALT_P

I thank you again in advance.... :)


file:
http://ftp.ezpos.com/tony.txt

Re: Idiot STILL needs help :)

Posted: Sat Jul 24, 2021 11:32 am
by hz_scotty
change this:

Code: Select all

         // prints 1 label, sets focus to NEXTBUTT
         @ 7, 19 DCPUSHBUTTON CAPTION '~Print' SIZE 9,1.2;
         ACTION {||  dc_msgbox(,,{'Label Printed'},,,1), SetAppFocus(DC_GetObject(Getlist,'NEXTBUTT')) };     // ACTION {|| PrintLabel(), SetAppFocus(DC_GetObject(Getlist,'NEXTBUTT') )   };
         ID 'PRINTBUTT';
         TABSTOP;
         ACCELKEY xbeK_ALT_P
"msgbox" to "dc_msgbox"

Re: Idiot STILL needs help :)

Posted: Sat Jul 24, 2021 12:50 pm
by BruceN
Thanks for the idea, but no change :(

Re: Idiot STILL needs help :)

Posted: Mon Jul 26, 2021 1:45 am
by reganc
BruceN wrote: Sat Jul 24, 2021 12:50 pm Thanks for the idea, but no change :(
If you have a button that needs to 'ignore' validation codeblocks, add:

CARGO "CANCEL" ;

to the button clause.

Re: Idiot STILL needs help :)

Posted: Mon Jul 26, 2021 6:32 am
by BruceN
Closer.... :)

Function displays description and on hand qty for item entered (display fields hidden when product ID is blank.) Previously, when clicking 'exit' with the product ID field empty nothing would happen.

With the CARGO on the exit button, when I click it (with ID empty) it displays desc and qty for an item then clicking again closes.

Interestingly, item displayed is not first or last in index order, nor first or last in physical file (it is record 742 of 3947.) It always shows that same item.

Hmmmmmm....

Re: Idiot STILL needs help :)

Posted: Mon Jul 26, 2021 6:40 am
by rdonnay
This takes too much of everybody's time to try to resolve your problems on this forum.

I'll call you again so we can knock this out via Teamviewer.