1. Need an other phix explanation please
- Posted by begin Feb 24, 2018
- 2086 views
try to compile Phix\demo\Win32Demo\star.exw with phix but to no avail. is there a fix or an explanation?
H:\Phix\demo\win32lib7\w32memory.ew:-1 (era=#0, from_addr=#04CDB8C8, ret_addr=#04CDB8FE) in function l_SafePeek() attempt to subscript an atom addr = {49178832,0} a = <novalue> l = <novalue> ... called from H:\Phix\demo\win32lib7\w32memory.ew:454 in function w32peek_string() a = 49178832 l = 0 s = <novalue> ... called from H:\Phix\demo\win32lib7\win32lib.ew:954 in function getWinVersion() lResult = {6,2,9200,2,0,0,0,0,0} lOV = 49178812 lResp = 1 ... called from H:\Phix\demo\win32lib7\win32lib.ew:1009 ... called from H:\Phix\demo\Win32Demo\win32lib.ew:7 ... called from H:\Phix\demo\Win32Demo\star.exw:3
2. Re: Need an other phix explanation please
- Posted by ChrisB (moderator) Feb 24, 2018
- 2152 views
Hi
I think Matt may have included the win32lib7 folder that I created when I added the most 'up to date' immplementation of win32lib to Phix.
If you use the ld win32demo folder, then there are quite a few gotchas in there that need to be looked out for when you try to run them.
First, if you have euphoria installed, then these demos in the w32demo folder will try to access them, because of the path settings that eu creates when it is installed. I have eu installed and I avoid these by always running phix programs from edita having set the paths to p.exe from within edita - pressing F5 then compiles and runs the program.
Next comment out the reference to the includes - Phix doesn't need them if they are 'standard' includes. This is the top of star.exw
--DEV port to Arwen, add to distro: -- As posted to EuForum 24/11/2012 by Derek Parnell include win32lib.ew --include std/math.e
note that include std/math.e has been commented out.
Next look at line 59
theta = rnd()*TWOPI should be theta = rnd()*PI*2
Next, see that include w32lib.ew line - thats an include to a shim so that I can tell the program where the version of win32lib is that I want to run - make sure you have this in the folder
--the contents of win32lib.ew in the w32demos folder --NB this does NOT work on RDS Eu! (Phix compatible) --include ..\win32lib\win32lib.ew --include ..\win32lib6\win32lib.ew --include ..\win32lib6x\win32lib.ew --include ..\w3270a\include\win32lib.ew --include ..\win32lib7\include\win32lib.ew --DEV remove include ..\win32lib7\win32lib.ew
As you may have guessed that's a relative include - basically says go one up from this folder, find win32lib7, go into that folder, and load in win32lib.ew
Note, my setup has win32lib6, and win32lib7 folders - the win32lib7 is (for me) the more up to date one, and the one which I am (ever so slowly) working to get a Phix win32lib IDE running on. I mean slowly / stalled / starting / stalled / oo, another star trek discovery episode's arrived.
I know that Pete is quite keen to use IUP, which does have some promise, but with a lot of these toolkits you have to hand code them which takes the fun out of it for me.
Cheers
Chris
3. Re: Need an other phix explanation please
- Posted by begin Feb 24, 2018
- 2094 views
thank you so very much for the explanation and all the hints.
i renamed the euphoria folder i changed star.exw with 2PI. but i never come to that location. i always get that error:
H:\Euphoriaprog\win32lib7\w32memory.ew:-1 (era=#0, from_addr=#04C12C52, ret_addr=#04C12C88) in function l_SafePeek() attempt to subscript an atom addr = {45709616,0} a = <novalue> l = <novalue> ... called from H:\Euphoriaprog\win32lib7\w32memory.ew:454 in function w32peek_string() a = 45709616 l = 0 s = <novalue> ... called from H:\Euphoriaprog\win32lib7\win32lib.ew:954 in function getWinVersion() lResult = {6,2,9200,2,0,0,0,0,0} lOV = 45709596 lResp = 1 ... called from H:\Euphoriaprog\win32lib7\win32lib.ew:1009 ... called from H:\Euphoriaprog\dax\bgi.e:3
i kind of need to to use winlib, since the iup plot does not allow for dates as labels (data), as far as i could find out by now. so i like to my own plotter.
do you have any idea to a fix for the above error?
richard
4. Re: Need an other phix explanation please
- Posted by ChrisB (moderator) Feb 24, 2018
- 2071 views
... called from H:\Euphoriaprog\win32lib7\win32lib.ew:1009 ... called from H:\Euphoriaprog\dax\bgi.e:3
Hi, that's a different program.
Cheers
Chris
5. Re: Need an other phix explanation please
- Posted by begin Feb 24, 2018
- 2059 views
yes sorry i copied the wrong err
H:\Phix\demo\win32lib7\w32memory.ew:-1 (era=#0, from_addr=#04C0C8DC, ret_addr=#04C0C912) in function l_SafePeek() attempt to subscript an atom addr = {51680656,0} a = <novalue> l = <novalue> ... called from H:\Phix\demo\win32lib7\w32memory.ew:454 in function w32peek_string() a = 51680656 l = 0 s = <novalue> ... called from H:\Phix\demo\win32lib7\win32lib.ew:954 in function getWinVersion() lResult = {6,2,9200,2,0,0,0,0,0} lOV = 51680636 lResp = 1 ... called from H:\Phix\demo\win32lib7\win32lib.ew:1009 ... called from H:\Phix\demo\Win32Demo\star.exw:3
line 3 in the previous was just an include include ..\win32lib7\win32lib.ew and nothing else
richard
6. Re: Need an other phix explanation please
- Posted by ChrisB (moderator) Feb 24, 2018
- 2061 views
Hmm, what is you line 954 of w32lib.ew, mine is
lResult[1] = WIN_2000
Chris
7. Re: Need an other phix explanation please
- Posted by begin Feb 24, 2018
- 2045 views
global function getWinVersion() sequence lResult atom lOV atom lResp lOV = w32to_memory(0,ID_OSVERSIONINFOEX,0) lResp = w32Func(xGetVersionEx, {lOV}) lResult = repeat(0,9) if lResp=0 then w32store(lOV, dwOSVersionInfoSize, SIZEOF_OSVERSIONINFO) lResp = w32Func(xGetVersionEx, {lOV}) end if lResult[1..4] = peek4s({lOV+4, 4}) lResult[5] = w32peek_string(lOV+20) <======================= 954 lResult[6] = w32fetch(lOV,wServicePackMajor) lResult[7] = w32fetch(lOV,wServicePackMinor) lResult[8] = w32fetch(lOV,wSuiteMask) lResult[9] = w32fetch(lOV,wProductType) w32release_mem(lOV) if lResult[1]=6 then lResult[1] = WIN_VISTA elsif lResult[4]=0 then lResult[1] = WIN_3_1 elsif lResult[4]=1 then if lResult[2]=0 then if equal(lResult[5], " C") then lResult[1] = WIN_95_OSR2 else lResult[1] = WIN_95 end if elsif lResult[2]=10 then if equal(lResult[5], " A") then lResult[1] = WIN_98SE else lResult[1] = WIN_98 end if else lResult[1] = WIN_ME end if lResult[3] = and_bits(#FFFF, lResult[3]) else if lResult[2]=51 then lResult[1] = WIN_NT_3_51 elsif lResult[2]=0 then if lResult[1]=4 then lResult[1] = WIN_NT_4 else lResult[1] = WIN_2000 end if elsif lResult[2]=1 then lResult[1] = WIN_XP else lResult[1] = WIN_UNKNOWN end if end if lResult[2] = lResult[5] if lResult[6]=0 then lResult = lResult[1..3] else lResult = lResult[1..3] & lResult[6..9] end if return lResult end function
8. Re: Need an other phix explanation please
- Posted by euphoric (admin) Feb 24, 2018
- 2030 views
i kind of need to to use winlib, since the iup plot does not allow for dates as labels (data), as far as i could find out by now. so i like to my own plotter.
Hey, richard, what do you mean by this? In the plot.exw example for pGUI, it shows plotting based on an X-axis of months. I'd be surprised if IupPlot didn't accept any kind of data. What kind of chart did you want to draw?
9. Re: Need an other phix explanation please
- Posted by petelomax Feb 24, 2018
- 2029 views
i kind of need to to use winlib, since the iup plot does not allow for dates as labels (data), as far as i could find out by now. so i like to my own plotter.
Hey, richard, what do you mean by this? In the plot.exw example for pGUI, it shows plotting based on an X-axis of months. I'd be surprised if IupPlot didn't accept any kind of data. What kind of chart did you want to draw?
Coincidentally, a couple of days ago I stumbled across a bug in pGUI, when investigating something to do with pointer sizes (I've forgotten the exact details already!). Anyway, on an offchance:
procedure iup_poke_string_pointer_array(atom ptr, sequence strings) for i=1 to length(strings) do string si = strings[i] -- pokeN(ptr,si,machine_word()) pokeN(ptr,IupRawStringPtr(si),machine_word()) ptr += machine_word() end for end procedure
More likely to be completely irrelevant than not, but IupPlotInsertStrSamples() and IupPlotAddStrSamples() would have been completely broken.
10. Re: Need an other phix explanation please
- Posted by begin Feb 24, 2018
- 2048 views
well, i have data in the form of {value, day}. i convert that while reading to an integer(day). for prediction purposes, i sometimes interpolate between days. so i thought i need something like bgi (yes, i am one of the older dudes) and write a quickly for plotting, that lets me use anything for an x-axis - that i have under control. i could not find that with pplot (y-give value, give x-value (date or hours ...) and have that displayed. so a new plotter- and i will share it (if i don't die before).
11. Re: Need an other phix explanation please
- Posted by petelomax Feb 24, 2018
- 2060 views
The only thing I can suggest is grabbing win32lib7 from http://phix.x10.mx/pmwiki/pmwiki.php?n=Main.Win32lib7ForPhix and giving that one a spin.
Regards,
Pete
12. Re: Need an other phix explanation please
- Posted by begin Feb 24, 2018
- 2019 views
thank you very much for this suggestion. i tried that, but it bring the same result, since the function getWinVersion() is the same. dose anyone maybe have an old version of this function that works?
13. Re: Need an other phix explanation please
- Posted by petelomax Feb 24, 2018
- 1997 views
Have you tried win32lib6?
14. Re: Need an other phix explanation please
- Posted by ChrisB (moderator) Feb 24, 2018
- 2070 views
Hi
This is the version of win32lib7 that I use (not sure if this is one that you use Pete though)
https://app.box.com/v/win32lib7forPhix
Cheers
Chris
15. Re: Need an other phix explanation please
- Posted by petelomax Feb 24, 2018
- 1989 views
(not sure if this is one that you use Pete though)
Yep, exact same thing (the PCAN entry includes the same link and a local copy).
16. Re: Need an other phix explanation please
- Posted by katsmeow Feb 25, 2018
- 1999 views
[OT]
I mean slowly / stalled / starting / stalled / oo, another star trek discovery episode's arrived.
This should not be a problem now. All first season episodes have been shown. A 2nd season has been ordered, but it may not be ready till early 2019.
Maybe the new Alicia Vikander "Tomb Raider" movie? I keep hoping a modern re-do of "Colossus: The Forbin Project" will happen, this time also involving China and India. They could make a sequel to "The Shape of Water".
[/OT]
17. Re: Need an other phix explanation please
- Posted by ChrisB (moderator) Feb 25, 2018
- 1992 views
[OT]
I mean slowly / stalled / starting / stalled / oo, another star trek discovery episode's arrived.
This should not be a problem now. All first season episodes have been shown. A 2nd season has been ordered, but it may not be ready till early 2019.
Maybe the new Alicia Vikander "Tomb Raider" movie? I keep hoping a modern re-do of "Colossus: The Forbin Project" will happen, this time also involving China and India. They could make a sequel to "The Shape of Water".
[/OT]
I have indeed watched al the episodes, but they were so good, and I'm such a Trekky, that I was counting down the days till Mondays. ANd looking forward to Tomb raider too.
Back to begin's puzzle - there is something different about your Phix/win32lib7 and mine, because mine works.
It's a pity the error doesn't give the exact line that the error happens on in l_safepeek, but one way of finding out is to put some test outputs at various points in l_safepeek - eg
puts(1, "got to line 230!\n") --put this on line 230, and so on
that can often help narrow down where the failure is. In fact my code is littered with these things commented out. Give it a go.
Cheers
Chris
2019 eh
18. Re: Need an other phix explanation please
- Posted by petelomax Feb 25, 2018
- 2093 views
The other thing to do is compile it to create a listing first (p -d star), then run the .exe, and then search for that era in the list.asm produced. If you cannot find it, try dropping the last digit.
Another thing you can try is to add
if "abc"="def" then tasks={} end if
at line 12 of builtins\VM\pTask.e, which stops the compiler complaining about (/thinking that) sequence tasks is not properly initialised.
19. Re: Need an other phix explanation please
- Posted by begin Feb 26, 2018
- 1984 views
fixed one problem:
make (or insert it in winlib32.ew) new file "w32NtDll.ew" with content of
global constant ntdll = registerw32Library("ntdll.dll"), xRtlGetVersion = registerw32Function(ntdll,"RtlGetVersion",{C_POINTER}, C_UINT)
change function getWinVersion in winlib32.ew. it now will get windows 10 and >
global function getWinVersion() sequence lResult atom lOV atom lResp lOV = w32to_memory(0,ID_OSVERSIONINFOEX,0) lResp = w32Func(xGetVersionEx, {lOV}) lResult = repeat(0,10) if lResp = 0 then w32store(lOV, dwOSVersionInfoSize, SIZEOF_OSVERSIONINFOEX) lResp = w32Func(xGetVersionEx, {lOV}) end if lResult[1..4] = peek4s({lOV+4, 4}) if (lResult[1] = 6) and (lResult[2] = 2) then w32release_mem(lOV) lOV = w32to_memory(0,ID_OSVERSIONINFOEX,0) lResp = w32Func(xRtlGetVersion, {lOV}) lResult = repeat(0,9) if lResp = 0 then w32store(lOV, dwOSVersionInfoSize, SIZEOF_OSVERSIONINFOEX) lResp = w32Func(xRtlGetVersion, {lOV}) end if lResult[1..4] = peek4s({lOV+4, 4}) lResult[3] = 0 lResult[5] = "" lResult[6] = w32fetch(lOV,wServicePackMajor) lResult[7] = w32fetch(lOV,wServicePackMinor) lResult[8] = w32fetch(lOV,wSuiteMask) lResult[9] = w32fetch(lOV,wProductType) else lResult[5] = w32peek_string(lOV + 20) lResult[6] = w32fetch(lOV,wServicePackMajor) lResult[7] = w32fetch(lOV,wServicePackMinor) lResult[8] = w32fetch(lOV,wSuiteMask) lResult[9] = w32fetch(lOV,wProductType) end if w32release_mem(lOV) if lResult[1]=10 then lResult[1]=WIN_10 elsif lResult[1]=6 then lResult[1]=WIN_VISTA elsif lResult[4] = 0 then lResult[1] = WIN_3_1 elsif lResult[4] = 1 then if lResult[2] = 0 then if equal(lResult[5], " C") then lResult[1] = WIN_95_OSR2 else lResult[1] = WIN_95 end if elsif lResult[2] = 10 then if equal(lResult[5], " A") then lResult[1] = WIN_98SE else lResult[1] = WIN_98 end if else lResult[1] = WIN_ME end if lResult[3] = and_bits(#FFFF, lResult[3]) else if lResult[2] = 51 then lResult[1] = WIN_NT_3_51 elsif lResult[2] = 0 then if lResult[1] = 4 then lResult[1] = WIN_NT_4 else lResult[1] = WIN_2000 end if elsif lResult[2] = 1 then lResult[1] = WIN_XP else lResult[1] = WIN_UNKNOWN end if end if lResult[2] = lResult[5] if lResult[6] = 0 then lResult = lResult[1..3] else lResult = lResult[1..3] & lResult[6..9] end if return lResult end function
now a new problem arises in procedure registerClass( object szClassName ) in winlib32.ew. any program crashes in
if w32Func( xRegisterClassEx, { wndClassEx } ) = 0 then abortErr( Err_REGCLASS ) end if
and i think it is a memory management problem in function w32to_memory of w32memory.ew.
anyone able to debug that? the failure of xRegisterClassEx causes my computer to shut down, and loose the recognition of the start partition.
20. Re: Need an other phix explanation please
- Posted by ChrisB (moderator) Feb 26, 2018
- 1948 views
Hi begin
Your modifications to win32lib.ew work for me, and don't produce the error you report.
You have to add WIN_10 = 10 to w32constants.ew (you probably did, but didn't mention this).
Stranger and stranger.
Do you have a virus, or are you running antivirus software (if the latter, try disabling it, and see what happens)?
Cheers
Chris
21. Re: Need an other phix explanation please
- Posted by begin Feb 26, 2018
- 1927 views
yes, i am sorry i forgot about the constant.
i used "https://app.box.com/v/win32lib7forPhix" which i thankfully downloaded.
after completely disabling the virus software, and scanning my computer with another virus software, the result remains the same.
i run the program (star.exw) with pw.exe. is this an error?
22. Re: Need an other phix explanation please
- Posted by ChrisB (moderator) Feb 26, 2018
- 1880 views
SHouldn't make any difference.
Are you on Windows 10 by any chance? Have you UAC to it's lowest setting?
Cheers
Chris
23. Re: Need an other phix explanation please
- Posted by begin Feb 26, 2018
- 1897 views
i am on win10 uac was one below highest turning it off, did not change any thing when running the program
24. Re: Need an other phix explanation please
- Posted by ChrisB (moderator) Feb 26, 2018
- 1897 views
This could be a windows 10 issue - I run on windows 7 and windows 8.1, and don't have a windows 10 machine to test. Need someone else to jump in and test on Win 10 machine here now I think.
Chris
25. Re: Need an other phix explanation please
- Posted by begin Feb 26, 2018
- 1924 views
that would be very nice if someone could do that.
26. Re: Need an other phix explanation please
- Posted by begin Feb 26, 2018
- 1829 views
here is another interesting happening
press F5 in edita to run the program
program crashes all other programs (explorer, edita etc close automatically).
displayed is:
H:\Phix\demo\edita\src\eatabl.e:359 in function TLwinHandler() variable action has not been assigned a value id = 149 msg = 16 wParam = 0 lParam = 0 rect = <novalue> ftxt = <novalue> c1 = <novalue> c2 = <novalue> cnew = <novalue> crem = <novalue> i = <novalue> i = <novalue> Global & Local Variables --> see H:\Euphoriaprog\dax\ex.err Press Enter...
ERROR_NOT_SUPPORTED
from registerclass function i get an getlasterror code of: 50 (0x32) The request is not supported.
does anybody have a clue?
27. Re: Need an other phix explanation please
- Posted by petelomax Feb 26, 2018
- 1874 views
OH, I JUST GOT IT! (I think)
You are trying to run win32lib on a 64-bit version of phix, but it is strictly 32-bit only. Afaik no-one has ever gotten win32lib to run as a 64-bit process, on OE or phix.
Run it with a 32-bit version (which will work just fine on a 64-bit box). If you are running Edita, you must be using a 32-bit phix to do so.
Pete
PS I'm running on Windows 10, with no problems here.
PPS if I run p64 edita, I get "arwen is not 64-bit compatible; use pGUI instead". Perhaps lines 10..17 of demo\arwen\Arwen.ew should be copied into the win32lib.ew files, with the one obvious change.
28. Re: Need an other phix explanation please
- Posted by begin Feb 26, 2018
- 1845 views
oh wow i am sorry for all the confusion i cause.
thank all
29. Re: Need an other phix explanation please
- Posted by ChrisB (moderator) Feb 26, 2018
- 1859 views
Hi
That's ok, just another gotcha! Any reason you have to use 64 bit Phix?
Cheers
Chris
30. Re: Need an other phix explanation please
- Posted by begin Feb 26, 2018
- 1841 views
well, anything one does, means NO 32bit anymore. people feel are very strong about that. so i must howl with the wolves.
31. Re: Need an other phix explanation please
- Posted by ChrisB (moderator) Feb 26, 2018
- 1867 views
Understood, but win32lib is going to need a complete rewrite to becom win64lib, and I doubt that will be happening any time soon.
Cheers
Chris
32. Re: Need an other phix explanation please
- Posted by begin Feb 26, 2018
- 1948 views
yes unfortunately. must think of something so.
33. Re: Need an other phix explanation please
- Posted by petelomax Feb 27, 2018
- 1827 views
It is why I switched to pGUI - 32/64 bit and windows/linux compatible.
If you need help with IupPlot, just ask.
Pete
35. Re: Need an other phix explanation please
- Posted by begin Feb 27, 2018
- 1791 views
that very gracious of you. well, maybe first a question i have daily data values, lets say temperature and moisture. i need to plot temperature and moisture as y and the date x coordinate. a dataset has +- 7000 datapoints each. the temperature scale is on the left, the moisture scale on the right. each curve has different color and so do the scales.
can one do that with pplot? i could not find any thing to that effect in the chm's.
36. Re: Need an other phix explanation please
- Posted by petelomax Feb 27, 2018
- 1800 views
No problem, try this:
include pGUI.e include builtins\timedate.e constant factor = 1e-6, dayone = parse_date_string("1/1/1999",{"D/M/YYYY"}), oneday = timedelta(days:=1) procedure main() IupOpen() Ihandle plot = IupPlot("GRID=YES, MARGIN=80, AXS_XTICKROTATENUMBER=YES") IupPlotBegin(plot,1) for i=1 to 7000 do timedate td = adjust_timedate(dayone,oneday*i) IupPlotAddStr(plot, format_timedate(td,"DD/MM/YYYY"), factor*i*i*i+0.2) end for {} = IupPlotEnd(plot) IupPlotBegin(plot,1) for i=1 to 7000 do timedate td = adjust_timedate(dayone,oneday*i) integer j = 7000-i IupPlotAddStr(plot, format_timedate(td,"DD/MM/YYYY"), factor*j*j*j+0.2) end for {} = IupPlotEnd(plot) Ihandle dlg = IupDialog(plot) IupSetAttributes(dlg, "RASTERSIZE=640x480") IupSetAttribute(dlg, "TITLE", "temperature/moisture") IupCloseOnEscape(dlg) IupShow(dlg) IupMainLoop() IupClose() end procedure main()
Regards,
Pete
EDIT: Sorry, I missed the part about two Y axis scales, but still it is probably an easier task to display a fake rhs one than write a full plotter. Perhaps set MARGINRIGHT and draw it in POSTDRAW_CB.
37. Re: Need an other phix explanation please
- Posted by begin Feb 27, 2018
- 1765 views
yes you may be wright. i will play with that source, -> just tried it, but it give an error.
H:\Euphoriaprog\pgui.e:247 if paranormalise(func=tcb)!={NULL,tcb,"",{}} then ?9/0 end if ^ undefined identifier func ...included by H:\Euphoriaprog\testeriup.ew, line 1 Press Enter, or d for diagnostics...
38. Re: Need an other phix explanation please
- Posted by petelomax Feb 27, 2018
- 1849 views
Very odd. I can't find a copy of pGUI.e with that statement on line 247, only ones with it on line 242 or 245.
If I run it on eui, I get:
C:\Program Files (x86)\Phix>eui demo\pgui\plot2.exw demo\pgui\pGUI.e:245 <0132>:: Syntax error - expected to see possibly ',', not ':' if paranormalise(func:=tcb)!={NULL,tcb,"",{}} then ?9/0 end if ^
and that is not what you got either, but may be a clue.
39. Re: Need an other phix explanation please
- Posted by begin Feb 27, 2018
- 1759 views
i save the file to demo\pgui and it ran without a hitch. look really good. is it possible to have a large canvas (ex. 20000 by 10000) and scrollbar that let you scroll along the graph?
40. Re: Need an other phix explanation please
- Posted by petelomax Feb 27, 2018
- 1760 views
Maybe. If you press '+' a few times you can drag the plot about with the mouse. Not sure how to achieve that sort of effect programmatically though.
41. Re: Need an other phix explanation please
- Posted by begin Feb 27, 2018
- 1817 views
ok, i'll explore that. if it works, i stay with iup.
thank you very, very much.
42. Re: Need an other phix explanation please
- Posted by begin Feb 27, 2018
- 1757 views
funny effect (bug)? when you zoom for the in between of 2 days and enlarge a little further, the dates go off. dates then tripple, quadruple etc.
43. Re: Need an other phix explanation please
- Posted by petelomax Feb 27, 2018
- 1775 views
funny effect (bug)? when you zoom for the in between of 2 days and enlarge a little further, the dates go off. dates then tripple, quadruple etc.
I think that's one for the IUP-users mailing list - which I no longer subscribe to.
If you feel like reporting it, I also noticed that right and top margins also cease to be honored properly about when that effect starts.
Note we're still on 3.23, though 3.24 has been released, so perhaps download a copy (see docs/pGUI/Background) and test that first.
44. Re: Need an other phix explanation please
- Posted by begin Feb 27, 2018
- 1752 views
will do after looking at this very hard i really come to like it. i spend the whole morning wrapping one of my old win libs, i got windows, menus .... to work, bit you're wright with iup.
richard
45. Re: Need an other phix explanation please
- Posted by begin Feb 27, 2018
- 1828 views
sorry, but where to download for vs2017 - any pointers?
46. Re: Need an other phix explanation please
- Posted by petelomax Feb 27, 2018
- 1806 views
sorry, but where to download for vs2017 - any pointers?
Not entirely sure what you are asking. If you are trying to download 3.24 then I recommend the dll12 downloads (32 or 64 bit) from https://sourceforge.net/projects/iup/files/3.24/Windows%20Libraries/Dynamic/ and repeat for the CD and IM libs.
Then you would need to rename demo\pGUI\win32(or64), and create a replacement out of those zip files - probably in all a half hour job or so.
47. Re: Need an other phix explanation please
- Posted by begin Feb 28, 2018
- 1725 views
i thought i have to compiler the libraries my self. if so, then i have vs2017.
i downloaded the new dll's and found that the plotting error is gone. anyhow, to make things easier, it would be nice if you could introduce in phix a wstring datatype, peek_wstring and poke_wstring. just wishful thinking.
thank you very much for all your help. i decided to stay with phix and iup for may future work.
richard
48. Re: Need an other phix explanation please
- Posted by petelomax Feb 28, 2018
- 1699 views
i thought i have to compiler the libraries my self. if so, then i have vs2017.
It is probably better to use the pre-compiled ones.
i downloaded the new dll's and found that the plotting error is gone.
Excellent. (Sigh, yet another task before I can release a new version!)
anyhow, to make things easier, it would be nice if you could introduce in phix a wstring datatype, peek_wstring and poke_wstring. just wishful thinking.
I have in fact just recently implemented peek_wstring() for someone else, though it has not yet hit the repository. And I've just added poke_wstring() to the internal version - next release will be a while yet, though.
You should already have allocate_wstring() as an alternative.
A wstring datatype as part of the core is however completely impractical. (A huge part of Phix's charm is that it has just 5 data tytes.) You can always write your own user defined type though.
Here's a copy of those new routines for use in the meantime:
-- (will be in/add to builtins\peekstr.e) global function peek_wstring(atom addr) atom ptr ptr = addr while peek2u(ptr) do ptr += 2 end while return peek2u({addr, (ptr-addr)/2}) end function -- (will be in/add to builtins\pokestr.e) global function poke_wstring(atom buffaddr, integer buffsize, sequence s) if buffaddr<=0 or buffsize<=length(s)*2 then return 0 end if if not string(s) then for i=1 to length(s) do if not atom(s[i]) then return 0 end if end for end if poke2(buffaddr, s) buffaddr += length(s)*2 poke2(buffaddr, 0) return buffaddr end function
obviously, until the matching auto-include changes to psym.e are shipped you will have to include those files manually, but when it is shipped you won't need to undo anything.
Regards,
Pete
49. Re: Need an other phix explanation please
- Posted by begin Feb 28, 2018
- 1690 views
A wstring datatype as part of the core is however completely impractical. (A huge part of Phix's charm is that it has just 5 data tytes.) You can always write your own user defined type though.
you are wright.
thanks a million for peek and poke. trying to expand on your plot to add menus - kind of. i am really coming to phix and iup.
richard