You can subscribe to this list here.
2005 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(60) |
Jul
(35) |
Aug
(32) |
Sep
(5) |
Oct
(5) |
Nov
(58) |
Dec
(34) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2006 |
Jan
(114) |
Feb
(184) |
Mar
(153) |
Apr
(90) |
May
(153) |
Jun
(59) |
Jul
(24) |
Aug
(43) |
Sep
(17) |
Oct
(34) |
Nov
(11) |
Dec
(204) |
2007 |
Jan
(84) |
Feb
(119) |
Mar
(38) |
Apr
(28) |
May
(52) |
Jun
(105) |
Jul
(64) |
Aug
(67) |
Sep
(14) |
Oct
(3) |
Nov
(28) |
Dec
(55) |
2008 |
Jan
(228) |
Feb
(55) |
Mar
(30) |
Apr
(30) |
May
(15) |
Jun
(20) |
Jul
(12) |
Aug
(3) |
Sep
(13) |
Oct
(54) |
Nov
(35) |
Dec
(35) |
2009 |
Jan
(19) |
Feb
(20) |
Mar
(34) |
Apr
(4) |
May
(60) |
Jun
(25) |
Jul
(16) |
Aug
(51) |
Sep
(19) |
Oct
(62) |
Nov
(21) |
Dec
(12) |
2010 |
Jan
(1) |
Feb
|
Mar
(4) |
Apr
(12) |
May
(23) |
Jun
(13) |
Jul
(1) |
Aug
(40) |
Sep
(18) |
Oct
(21) |
Nov
(26) |
Dec
(34) |
2011 |
Jan
(17) |
Feb
(23) |
Mar
(1) |
Apr
(10) |
May
(1) |
Jun
(5) |
Jul
(1) |
Aug
|
Sep
|
Oct
(2) |
Nov
|
Dec
(43) |
2012 |
Jan
(5) |
Feb
(19) |
Mar
(6) |
Apr
(24) |
May
(39) |
Jun
(83) |
Jul
(29) |
Aug
(36) |
Sep
(64) |
Oct
(55) |
Nov
(12) |
Dec
(7) |
2013 |
Jan
(17) |
Feb
(10) |
Mar
(37) |
Apr
(27) |
May
(13) |
Jun
(9) |
Jul
(7) |
Aug
(61) |
Sep
(23) |
Oct
(23) |
Nov
(30) |
Dec
(16) |
2014 |
Jan
(23) |
Feb
(13) |
Mar
(9) |
Apr
(17) |
May
(2) |
Jun
(11) |
Jul
(2) |
Aug
|
Sep
(9) |
Oct
(24) |
Nov
(2) |
Dec
(14) |
2015 |
Jan
(6) |
Feb
(4) |
Mar
(17) |
Apr
|
May
(7) |
Jun
(3) |
Jul
|
Aug
|
Sep
(2) |
Oct
(21) |
Nov
(6) |
Dec
(2) |
2016 |
Jan
(4) |
Feb
(2) |
Mar
(7) |
Apr
(3) |
May
(11) |
Jun
(6) |
Jul
|
Aug
(1) |
Sep
|
Oct
|
Nov
|
Dec
|
2017 |
Jan
|
Feb
|
Mar
|
Apr
(1) |
May
(1) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2018 |
Jan
(2) |
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2019 |
Jan
|
Feb
|
Mar
(6) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2020 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
(1) |
Oct
|
Nov
|
Dec
|
2022 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(2) |
Nov
(4) |
Dec
|
2023 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(8) |
Nov
|
Dec
|
2024 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
(2) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
S | M | T | W | T | F | S |
---|---|---|---|---|---|---|
|
|
|
1
(3) |
2
|
3
(2) |
4
(2) |
5
|
6
(2) |
7
|
8
(1) |
9
(2) |
10
|
11
|
12
|
13
|
14
|
15
|
16
|
17
|
18
|
19
|
20
|
21
|
22
|
23
|
24
|
25
|
26
|
27
|
28
|
29
(6) |
30
(10) |
31
(6) |
|
From: Andre A. <ar...@ki...> - 2010-12-30 23:35:43
|
I hope this version will run “strict” is a popular module used to prevent leaky variables, most useful. This code emulates the spin control and should make it easier to support your variations. I hope it works. I just shorten the lines. Line are not properly broken and probably should be adjusted for clarity. local baseID = wx.wxID_HIGHEST + 1 textControls = {} frame = wx.wxFrame(wx.NULL, wx.wxID_ANY,'Test spin control') frame:Show(true) function spin(event) local localSpin = event:GetEventObject(): DynamicCast("wxSpinButton") print(localSpin.Value) print(event.Id) textControls[event.Id - baseID + 1][1].Value = tostring(localSpin.Value)..'!' end function text(event) print(event.KeyCode) event:Skip() local localText = event:GetEventObject(): DynamicCast("wxTextCtrl") local v = tonumber(localText.Value) print(v) if v then textControls[event.Id - baseID + 1][2].Value = v end end for ID= baseID, baseID + 10 do local top = 30*#textControls local textControl = wx.wxTextCtrl(frame, ID, 'test', wx.wxPoint(20,top)) local spinControl = wx.wxSpinButton(frame, ID, wx.wxPoint(0,top)) table.insert(textControls, {textControl, spinControl}) spinControl:SetRange(10,20) spinControl:Connect(wx.wxEVT_SCROLL_LINEUP, spin) spinControl:Connect(wx.wxEVT_SCROLL_LINEDOWN, spin) textControl:Connect(wx.wxEVT_KEY_DOWN, text) end wx.wxGetApp():MainLoop() Good luck. Andre |
From: Lostgallifreyan <z....@bt...> - 2010-12-30 19:54:49
|
Small syntactic question... Andre's code in another thread used a dot, the results are neater than the colon I learned to use.... ST:SetLabel(SC:GetValue() ST.Label=SC.Value I imagine this is an old issue so I'll keep this short: Is one of these methods to be deprecated (made obsolete), and if so, which? Ok, one more question: Is there a case where the two methods are NOT equivalent, and if so, what? |
From: Lostgallifreyan <z....@bt...> - 2010-12-30 19:18:43
|
Andre Arpin <ar...@ki...> wrote: (30/12/2010 14:36) >function FeedBack(event) > local Id = event.Id > ..... old code for feed back >end > >for I=7,151 do > CT[I]:Connect(wx.wxEVT_KILL_FOCUS, FeedBack) >end I accidentally found an even better way! :) Make a dummy function that does nothing, and call that. So long as it does not end with Event:Skip() the internal display change (text replaced with lowest preset internal number value) does not occur on de-focus, so we don't need to force an update to replace the text. Again, this fails to solve the biggest problem because NO neat fixes like these ever work unless a signal is generated to which we can respond, even if the internal value does nto change because it's already at limit. I think it should ALWAYS be considered an 'update' if some explicit event attempted to cause a change in the internal value. This is the reason I am certain that Spinctrl is broken, and that this is not user error. This time I hope this filters right back up the chain of command to where the buck belongs. Someone up there needs to listen to this. |
From: Lostgallifreyan <z....@bt...> - 2010-12-30 19:03:22
|
Lostgallifreyan <z....@bt...> wrote: (30/12/2010 15:53) >>function FeedBack(event) >> local Id = event.Id >> ..... old code for feed back >>end >> >>for I=7,151 do >> CT[I]:Connect(wx.wxEVT_KILL_FOCUS, FeedBack) >>end >> > >.....I see your point, but I have other calls to FeedBack() that have an ID, are not event driven. If I could test for variable type at the start of FeedBack() this might work, possibly? I don't know if the event passed to a variable HAS a type, in the Lua sense of the word... > Andre, your code works fine for the de-focus bit now, with the first line of FeedBack being: if type(ID)=="userdata" then ID=ID:GetId() end This is neat enough to please me well, though it still leaves SpinCtrl's event signals wanting. If they'd just let us have the update signal every time an internal update occured, we'd be ok. Either that or NO internal update occurs if no signal is sent. But "signal always" (whether the internal update occurs by text entry, arrow keys, button click, mousewheel, de-focus, or anything else) MUST be the better choice, because that lets us code fixes which is otherwise impossible. |
From: Lostgallifreyan <z....@bt...> - 2010-12-30 18:52:18
|
I couldn't run that one... it throws errors I can't even interpret with my limited knowledge. Lack of 'strict' to require, whatever it is.., lack of value for #textControls, some of the error messages I saw resulting from my attempts to fix this had so many lines I didn't even try to diagnose them. After correcting a linewrap and omitting the first three lines of code I saw a displayed frame but it looks like this is all headed in directions I really don't want to go. > maybe wxEVT_COMMAND_SPINCTRL_UPDATED might work I did not try it. First thing I tried. This is the core of the problem, because it doesn't work! If the value does not change because it is already at set limit, no event signal is sent, so we cannot handle this case, ever! This is where we need to return to my first mail and consider the implications deeply. > You probably want the text to always be numeric etc leaving this to the > reader, always mean to me the writer has no clue how to doit :) Well, yes. :) That's sort of the point. Like I said in the first mail, we often need to show the user a list of stuff like thread sizes, musical note values... The original Spinctrl could handle this. Any valid (in-range) numeric input typed and entered would work, and my FeedBack() function would update the Spinctrl with a text display that made much better sense to the user than the number, which the machine was better able to use. So everyone's happy. Or they were, until some wiseguy broke Spinctrl! Andre Arpin <ar...@ki...> wrote: (30/12/2010 18:23) >try this you have full control if yo do not like using the ID for an offset to >an index you could use Set/GetClientData on the control > >textControl.ClientData = #textControls >spinControl.ClientData = #textControls > >require 'strict' >local baseID = wx.wxID_HIGHEST + 1 > >textControls = {} >frame = wx.wxFrame(wx.NULL, wx.wxID_ANY,'Test spin control') >frame:Show(true) > >function spin(event) > local localSpin = event:GetEventObject():DynamicCast("wxSpinButton") > print(localSpin.Value) > print(event.Id) > textControls[event.Id - baseID + 1][1].Value = tostring >(localSpin.Value)..'!' >end > >function text(event) > print(event.KeyCode) > event:Skip() > local localText = event:GetEventObject():DynamicCast("wxTextCtrl") > local v = tonumber(localText.Value) > print(v) > if v then > textControls[event.Id - baseID + 1][2].Value = v > end >end > >for ID= baseID, baseID + 10 do > local top = 30*#textControls > local textControl = wx.wxTextCtrl(frame, ID, 'test', wx.wxPoint(20,top)) > local spinControl=wx.wxSpinButton(frame, ID, wx.wxPoint(0,top)) > table.insert(textControls, {textControl, spinControl}) > spinControl:SetRange(10,20) > spinControl:Connect(wx.wxEVT_SCROLL_LINEUP, spin) > spinControl:Connect(wx.wxEVT_SCROLL_LINEDOWN, spin) > textControl:Connect(wx.wxEVT_KEY_DOWN, text) >end > >wx.wxGetApp():MainLoop() > >maybe wxEVT_COMMAND_SPINCTRL_UPDATED might work I did not try it. > >You probably want the text to always be numeric etc leaving this to the >reader, always mean to me the writer has no clue how to doit :) > >Good luck > >Andre > > >------------------------------------------------------------------------------ >Learn how Oracle Real Application Clusters (RAC) One Node allows customers >to consolidate database storage, standardize their database environment, and, >should the need arise, upgrade to a full multi-node Oracle RAC database >without downtime or disruption >http://p.sf.net/sfu/oracle-sfdevnl >_______________________________________________ >wxlua-users mailing list >wxl...@li... >https://lists.sourceforge.net/lists/listinfo/wxlua-users |
From: Andre A. <ar...@ki...> - 2010-12-30 18:24:16
|
> Thankyou. That did so many odd things that I don't know what to do with it. :) Nice to see a fully worked example > though, snippets don't always work, full examples do, I wish they happened more often. :) > > While I can do the area detection (already had to in some other project), this is not really the answer. As you > see, it takes a lot of ectra code. It doesn't stop there either, I have to handle arrow keys, mouse scrolls, > maybe even more stuff, just to get a Spinctrl to work as it used to with NONE of this extra code! > try this you have full control if yo do not like using the ID for an offset to an index you could use Set/GetClientData on the control textControl.ClientData = #textControls spinControl.ClientData = #textControls require 'strict' local baseID = wx.wxID_HIGHEST + 1 textControls = {} frame = wx.wxFrame(wx.NULL, wx.wxID_ANY,'Test spin control') frame:Show(true) function spin(event) local localSpin = event:GetEventObject():DynamicCast("wxSpinButton") print(localSpin.Value) print(event.Id) textControls[event.Id - baseID + 1][1].Value = tostring (localSpin.Value)..'!' end function text(event) print(event.KeyCode) event:Skip() local localText = event:GetEventObject():DynamicCast("wxTextCtrl") local v = tonumber(localText.Value) print(v) if v then textControls[event.Id - baseID + 1][2].Value = v end end for ID= baseID, baseID + 10 do local top = 30*#textControls local textControl = wx.wxTextCtrl(frame, ID, 'test', wx.wxPoint(20,top)) local spinControl=wx.wxSpinButton(frame, ID, wx.wxPoint(0,top)) table.insert(textControls, {textControl, spinControl}) spinControl:SetRange(10,20) spinControl:Connect(wx.wxEVT_SCROLL_LINEUP, spin) spinControl:Connect(wx.wxEVT_SCROLL_LINEDOWN, spin) textControl:Connect(wx.wxEVT_KEY_DOWN, text) end wx.wxGetApp():MainLoop() maybe wxEVT_COMMAND_SPINCTRL_UPDATED might work I did not try it. You probably want the text to always be numeric etc leaving this to the reader, always mean to me the writer has no clue how to doit :) Good luck Andre |
From: Lostgallifreyan <z....@bt...> - 2010-12-30 16:05:08
|
Andre Arpin <ar...@ki...> wrote: (30/12/2010 15:47) >> If you have an equally neat trick to solve the spinctrl's habit of replacing >text with the internal numeric >> value every time I hit the MAX or MIN limit, please show me. This is by far >the more serious problem because >> the internal handling updates the display but does not send a signal! That >means there is likely no simple >> way to prevent it doing this, except to detect any click as you showed in >the first mail. >> > >---try this code you may it useful >---I use long name so I do need to comment (I am terrible at it) > >-- The fucntion GoingUp return the current control so only two functions are >-- needed for the up and down > >frame = wx.wxFrame(wx.NULL, wx.wxID_ANY,'Test spin control') >frame:Show(true) >globalSpinControl=wx.wxSpinCtrl(frame) >globalSpinControl:SetRange(10,40) > >local function GoingUp(event) > local SpinCntrl = event:GetEventObject():DynamicCast('wxSpinCtrl') > local mouseY, spRect = event:GetPosition().Y, SpinCntrl:GetRect() > return event:GetEventObject():DynamicCast('wxSpinCtrl'), mouseY < >spRect.Top + spRect.Height / 2 >end > >local theValue = 0 > >local MOUSE_DOWN = > function (event) > print('in EVT_LEFT_DOWN') > local localSpinControl, Up = GoingUp(event) > theValue = localSpinControl.Value > print(localSpinControl.Value, 'before') > event:Skip() > print(localSpinControl.Value, 'after') > end > >local MOUSE_UP = > function (event) > print('in EVT_LEFT_UP') > local localSpinControl, Up = GoingUp(event) > local highHit, lowHit = false, false > print('theValue:'..theValue, 'GoingUp? : ' , Up) > print(localSpinControl.Value, 'before') > event:Skip() > print(localSpinControl.Value, 'after') >--[[ localSpinControl.Value = 16 -- set the value here to what you >want]] > if Up then > highHit = theValue == localSpinControl.Max > else > lowHit = theValue == localSpinControl.Min > end > print('highHit: '..tostring(highHit), 'lowHit: '..tostring(lowHit)) > end > >globalSpinControl:Connect(wx.wxEVT_LEFT_UP, MOUSE_UP) >globalSpinControl:Connect(wx.wxEVT_LEFT_DOWN, MOUSE_DOWN) > >wx.wxGetApp():MainLoop() > >A problem with this code is that if you hold the mouse down on a button it >does not report a hi or lot hit properly. > >so maybe > highHit = theValue == localSpinControl.Max or > localSpinControl.Max == localSpinControl.Value > > >would be a better test > > >Andre >Happy new year > Thankyou. That did so many odd things that I don't know what to do with it. :) Nice to see a fully worked example though, snippets don't always work, full examples do, I wish they happened more often. :) While I can do the area detection (already had to in some other project), this is not really the answer. As you see, it takes a lot of ectra code. It doesn't stop there either, I have to handle arrow keys, mouse scrolls, maybe even more stuff, just to get a Spinctrl to work as it used to with NONE of this extra code! One thing I found was an UpdateUI event or some such. It forced update at all times though, so it is a vicious cycle that detects its own updates, updates again, chewing as much of my CPU time as ti can get a hold of. :) If I could find somethingsimilar but a tad less trigger-happy it might solve this yet. |
From: Lostgallifreyan <z....@bt...> - 2010-12-30 15:54:08
|
Andre Arpin <ar...@ki...> wrote: (30/12/2010 14:36) >> for I=7,151 do >> CT[I]:Connect(wx.wxEVT_KILL_FOCUS, >> function(EV) FeedBack(EV:GetId()) end >> ) >> end >> > >> What about: >local function KILL_FOCUS(EV) FeedBack(EV:GetId() > >for I=7,151 do > CT[I]:Connect(wx.wxEVT_KILL_FOCUS, KILL_FOCUS) >end > > >151 pointers to one function > >better > >function FeedBack(event) > local Id = event.Id > ..... old code for feed back >end > >for I=7,151 do > CT[I]:Connect(wx.wxEVT_KILL_FOCUS, FeedBack) >end > This is a bit like focussing on a leaky tap in a burning building, given the other more serious problems with Spinctrl. I know attention to details matters, but not at the expense of the whole picture. I think this is why Spinctrl got broken in the first place! Too much specialisation... Not good for science in general. Certainly not good for code. That said, I'll bite. :) It's still worth discussing. I see your point, but I have other calls to FeedBack() that have an ID, are not event driven. If I could test for variable type at the start of FeedBack() this might work, possibly? I don't know if the event passed to a variable HAS a type. in the Lua sense of the word... |
From: Andre A. <ar...@ki...> - 2010-12-30 15:48:09
|
> If you have an equally neat trick to solve the spinctrl's habit of replacing text with the internal numeric > value every time I hit the MAX or MIN limit, please show me. This is by far the more serious problem because > the internal handling updates the display but does not send a signal! That means there is likely no simple > way to prevent it doing this, except to detect any click as you showed in the first mail. > ---try this code you may it useful ---I use long name so I do need to comment (I am terrible at it) -- The fucntion GoingUp return the current control so only two functions are -- needed for the up and down frame = wx.wxFrame(wx.NULL, wx.wxID_ANY,'Test spin control') frame:Show(true) globalSpinControl=wx.wxSpinCtrl(frame) globalSpinControl:SetRange(10,40) local function GoingUp(event) local SpinCntrl = event:GetEventObject():DynamicCast('wxSpinCtrl') local mouseY, spRect = event:GetPosition().Y, SpinCntrl:GetRect() return event:GetEventObject():DynamicCast('wxSpinCtrl'), mouseY < spRect.Top + spRect.Height / 2 end local theValue = 0 local MOUSE_DOWN = function (event) print('in EVT_LEFT_DOWN') local localSpinControl, Up = GoingUp(event) theValue = localSpinControl.Value print(localSpinControl.Value, 'before') event:Skip() print(localSpinControl.Value, 'after') end local MOUSE_UP = function (event) print('in EVT_LEFT_UP') local localSpinControl, Up = GoingUp(event) local highHit, lowHit = false, false print('theValue:'..theValue, 'GoingUp? : ' , Up) print(localSpinControl.Value, 'before') event:Skip() print(localSpinControl.Value, 'after') --[[ localSpinControl.Value = 16 -- set the value here to what you want]] if Up then highHit = theValue == localSpinControl.Max else lowHit = theValue == localSpinControl.Min end print('highHit: '..tostring(highHit), 'lowHit: '..tostring(lowHit)) end globalSpinControl:Connect(wx.wxEVT_LEFT_UP, MOUSE_UP) globalSpinControl:Connect(wx.wxEVT_LEFT_DOWN, MOUSE_DOWN) wx.wxGetApp():MainLoop() A problem with this code is that if you hold the mouse down on a button it does not report a hi or lot hit properly. so maybe highHit = theValue == localSpinControl.Max or localSpinControl.Max == localSpinControl.Value would be a better test Andre Happy new year |
From: Andre A. <ar...@ki...> - 2010-12-30 14:37:13
|
Lostgallifreyan <z.crow@...> writes: > > > Andre Arpin <arpin@...> wrote: > (29/12/2010 21:42) > > >sp:Connect(wx.wxEVT_KILL_FOCUS, > > function(event) > > print('k') > > end) > > > > Thanks again for this, it works great. > > I had to modify it to this: > > for I=7,151 do > CT[I]:Connect(wx.wxEVT_KILL_FOCUS, > function(EV) FeedBack(EV:GetId()) end > ) > end > > What about: local function KILL_FOCUS(EV) FeedBack(EV:GetId() for I=7,151 do CT[I]:Connect(wx.wxEVT_KILL_FOCUS, KILL_FOCUS) end 151 pointers to one function better function FeedBack(event) local Id = event.Id ..... old code for feed back end for I=7,151 do CT[I]:Connect(wx.wxEVT_KILL_FOCUS, FeedBack) end Andre |