Re: [Gnoga-list] Position of last Drop

2015-04-09 Thread Rabbi David Botton
Gnoga does support dropover the On_Drop uses it. However at the time I
probably didn't think the exact x,y was that important when dropping
elements on top of each other and assumed that capturing the last
On_Mouse_Up would have been sufficient.

I'll add an event for this and work on what Pascal sent for key strokes
after my holiday, this weekend.

David Botton
--
BPM Camp - Free Virtual Workshop May 6th at 10am PDT/1PM EDT
Develop your own process in accordance with the BPMN 2 standard
Learn Process modeling best practices with Bonita BPM through live exercises
http://www.bonitasoft.com/be-part-of-it/events/bpm-camp-virtual- event?utm_
source=Sourceforge_BPM_Camp_5_6_15utm_medium=emailutm_campaign=VA_SF___
Gnoga-list mailing list
Gnoga-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gnoga-list


[Gnoga-list] Position of last Drop

2015-04-09 Thread Gautier de Montmollin
Hello,I'm new to GNOGA so perdon my beginner questions...I'd like to register 
the mouse position of last drop operation.The idea is to be able to move 
objects.
Starting from tutorial 7, I have so far managed to have a drop anywhere by 
changing   App.Target.On_Drop_Handler (Drop'Unrestricted_Access);into  
App.My_View.On_Drop_Handler (Drop'Unrestricted_Access);
Now getting the X,Y from the mouse is trickier.So far I've tried to set up 
mouse handlers to memorize the mouse pointer position before the drop but none 
does seem to work properly.
   procedure Start_Drag (Object : in out Gnoga.Gui.Base.Base_Type'Class)   is   
   App : App_Access := App_Access (Object.Connection_Data);   begin  
App.Source.Opacity (0.4);  --App.Source.On_Mouse_Up_Handler 
(Mouse_Move'Unrestricted_Access);  --App.Source.On_Mouse_Move_Handler 
(Mouse_Move'Unrestricted_Access);  --App.My_View.On_Mouse_Up_Handler 
(Mouse_Move'Unrestricted_Access);  App.My_View.On_Mouse_Move_Handler 
(Mouse_Move'Unrestricted_Access);   end Start_Drag;
The not-commented version kind of works but gives very unreliable mouse 
positions.It seems that the drag-and-drop operation is masking the 
On_Mouse_Move_Handler (it works well *after* the drop).
Probably there is a proper way and hopefully I'll get answer like but why 
don't you simply do that and that ? :-)
TIAGautier

  --
BPM Camp - Free Virtual Workshop May 6th at 10am PDT/1PM EDT
Develop your own process in accordance with the BPMN 2 standard
Learn Process modeling best practices with Bonita BPM through live exercises
http://www.bonitasoft.com/be-part-of-it/events/bpm-camp-virtual- event?utm_
source=Sourceforge_BPM_Camp_5_6_15utm_medium=emailutm_campaign=VA_SF___
Gnoga-list mailing list
Gnoga-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gnoga-list


Re: [Gnoga-list] Position of last Drop

2015-04-09 Thread Björn Lundin
On 2015-04-09 15:03, Gautier de Montmollin wrote:
 Hello,
 I'm new to GNOGA so perdon my beginner questions...
 I'd like to register the mouse position of last drop operation.
 The idea is to be able to move objects.
 

I (slowly) make my self acquainted with drag/drop via a
tic/tac/toe game.
3x3 squares where I can drop X:es or O:s where the
square is free. (Not done yet)

But I find it useful to set up these callbacks

  -- set source
   procedure Start_Drag
   procedure End_Drag


  -- set target
   procedure Enter_Drag
  -- clear target
   procedure Leave_Drag

  -- execute on target
   procedure Drop (Object: in out Gnoga.Gui.Base.Base_Type'Class;
   Drag_Text : in String ) ;


and see in what order they are fired,
and save info in the app-specific data structure - my_app


--
Björn

--
BPM Camp - Free Virtual Workshop May 6th at 10am PDT/1PM EDT
Develop your own process in accordance with the BPMN 2 standard
Learn Process modeling best practices with Bonita BPM through live exercises
http://www.bonitasoft.com/be-part-of-it/events/bpm-camp-virtual- event?utm_
source=Sourceforge_BPM_Camp_5_6_15utm_medium=emailutm_campaign=VA_SF
___
Gnoga-list mailing list
Gnoga-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gnoga-list


Re: [Gnoga-list] On_Key_Press_Handler.

2015-04-09 Thread Pascal
Thanks, for your contributions.

Here is a modified package:


key_code_list.ads
Description: Binary data


More over, regarding browsers behaviors, I propose to split the Javascript 
which code into keyCode and charCode.
Here is Firefox behavior:
- a key- keyEvent + keyCode + charCode + altKey 
+ctrlKey + shiftKey + metaKey 
2015-04-09 21:28:38.58 : KEY_DOWN, 65,NUL,FALSE,FALSE,FALSE,FALSE
2015-04-09 21:28:38.58 : KEY_PRESS, 0,'a',FALSE,FALSE,FALSE,FALSE
2015-04-09 21:28:38.67 : KEY_UP, 65,NUL,FALSE,FALSE,FALSE,FALSE

- F1  key- keyEvent + keyCode + charCode + altKey 
+ctrlKey + shiftKey + metaKey 
2015-04-09 21:38:25.44 : KEY_DOWN, 112,NUL,FALSE,FALSE,FALSE,FALSE
2015-04-09 21:38:25.44 : KEY_PRESS, 112,NUL,FALSE,FALSE,FALSE,FALSE
2015-04-09 21:38:25.51 : KEY_UP, 112,NUL,FALSE,FALSE,FALSE,FALSE

KEY_DOWN and KEY_UP set always keyCode to javascript code and charCode to null.
KEY_PRESS set keyCode to null and charCode to Unicode character (i.e. 
Wide_Character) for a common character and set keyCode to javascript code and 
charCode to null for a special key. 
Thus it is easier to find out common characters and special keys.

Here is a GNOGA patch proposal:


patch8.diff
Description: Binary data


And modified test code:


essai9.adb
Description: Binary data


What is your feedback?

Regards, Pascal.
http://blady.pagesperso-orange.fr


Le 9 avr. 2015 à 05:33, Jeremiah Breeden jeremiah.bree...@gmail.com a écrit :

 As a followup, Key_press seems to follow the ASCII table (where the key has 
 an ASCII rep), at least for some of the browsers.  Worth looking into 
 probably.
 
 On Wed, Apr 8, 2015 at 11:21 PM, Jeremiah Breeden 
 jeremiah.bree...@gmail.com wrote:
 I didn't find a Key_press table, but for key_down and key_up, 
 javascripter.net suggests:
 http://www.javascripter.net/faq/keycodes.htm
 
 I don't have a way to verify all of those, but come cursory checks versus 
 what you posted here seem to match.
 
 On Tue, Apr 7, 2015 at 5:45 PM, Jeffrey R. Carter jrcar...@acm.org wrote:
 On 04/07/2015 01:02 PM, Pascal wrote:
  So I went deeper in Javascript particularity particularly with the help of:
  http://javascript.info/tutorial/keyboard-events
 
  Thus Key_up and Key_Down occur for each key press and release then key code 
  is apparently not so standardized across browsers.
  See http://unixpapa.com/js/key.html.
 
  Nevertheless I provide a package Key_Code_List with the correspondance 
  between key and code as I found it on my Mac, Safari and French keyboard.
  Other OS and browsers and keyboard may give other couples.
  Please come back to me with the couples or add them directly in the package.
 With my US keyboard and Firefox, Insert gives
 
 2015-04-07 14:36:34.43 : KEY_DOWN, 45,FALSE,FALSE,FALSE,FALSE
 2015-04-07 14:36:34.43 : KEY_PRESS, 0,FALSE,FALSE,FALSE,FALSE
 2015-04-07 14:36:34.48 : KEY_UP, 45,FALSE,FALSE,FALSE,FALSE
 
...
 HTH
 
 --
 Jeff Carter
 Ada has made you lazy and careless. You can write programs in C that
 are just as safe by the simple application of super-human diligence.
 E. Robert Tisdale
 72
 

--
BPM Camp - Free Virtual Workshop May 6th at 10am PDT/1PM EDT
Develop your own process in accordance with the BPMN 2 standard
Learn Process modeling best practices with Bonita BPM through live exercises
http://www.bonitasoft.com/be-part-of-it/events/bpm-camp-virtual- event?utm_
source=Sourceforge_BPM_Camp_5_6_15utm_medium=emailutm_campaign=VA_SF___
Gnoga-list mailing list
Gnoga-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gnoga-list


Re: [Gnoga-list] Sliding content

2015-04-09 Thread tony gair
I just discovered Load_JQueryUI. All working thank you!

On Wed, Apr 8, 2015 at 8:41 PM, tony gair tonytheg...@gmail.com wrote:

 I've been trying to use that sliding effect on a gnoga app and nothing
 seems to happen, do you need an html page to do it on or something like
 that?

 On Wed, Apr 8, 2015 at 4:34 PM, Rabbi David Botton da...@botton.com
 wrote:

 I'll see what I can do

 On Wed, Apr 8, 2015 at 11:12 AM tony gair tonytheg...@gmail.com wrote:

 oh yes what I meant to say was I am looking for the extra files that the
 gnoga site source uses

 On Wed, Apr 8, 2015 at 4:11 PM, tony gair tonytheg...@gmail.com wrote:

 I've done that. I promise not to operate a copy of the gnoga site btw!
 ha! its all for educational purposes.

 I'm finding the code hard to follow because of my ignorance on classes
 and inheritence in ada, is there a tutorial somewhere on this?


 On Wed, Apr 8, 2015 at 2:41 PM, Rabbi David Botton da...@botton.com
 wrote:

 As for the sources, I'll see if I can put something together, for now
 just copy and paste out.

 On Wed, Apr 8, 2015 at 9:40 AM Rabbi David Botton da...@botton.com
 wrote:

 Make sure to look at test/jdemo.adb there I test almost every JQuery
 UI control and there are you can see other uses of effects, etc.

 On Wed, Apr 8, 2015 at 8:25 AM tony gair tonytheg...@gmail.com
 wrote:

 Is there a downloadable version of this source? This is so I can
 follow things through with an editor, I'm finding it difficult to follow
 through the provided source visual tool?

 On Wed, Apr 8, 2015 at 10:23 AM, tony gair tonytheg...@gmail.com
 wrote:

 If anyone is interestedin Q2 , take a look at https://jqueryui.com/
 effect/

 On Tue, Apr 7, 2015 at 9:16 PM, tony gair tonytheg...@gmail.com
 wrote:

 Hi David,
2 questions about this!
 1) how did you rig the buttons on the top to operate
 independently of the views
 2) what other effects are there. is there a doc on this
 thanks
 Tony

 On Mon, Apr 6, 2015 at 11:17 PM, Rabbi David Botton 
 da...@botton.com wrote:

 In Gnoga_Web.Controller the key procedure is this:

  procedure New_Content_View
  (New_View : access Gnoga.Gui.View.View_Base_Type'Class)
is
   App : App_Access := App_Access (New_View.Connection_Data);
begin
   if App.Current_View /= null then
  Gnoga.Gui.Plugin.jQueryUI.Hide_With_Effect
(Element= App.Current_View.all,
 Effect_Name= slide);

  if App.Current_View.Dynamic then
 App.Current_View.Free;
  end if;
   end if;

   App.Current_View := New_View;

   Gnoga.Gui.Plugin.jQueryUI.Show_With_Effect
 (Element= App.Current_View.all,
  Effect_Name= slide);
end New_Content_View;


 On Mon, Apr 6, 2015 at 6:16 PM Rabbi David Botton 
 da...@botton.com wrote:

 Sorry I didn't restart the source app on last reboot. Is up now.
 Try again.


 David Botton


 On Mon, Apr 6, 2015 at 5:20 PM Olivier Henley 
 olivier.hen...@gmail.com wrote:

 Where am I supposed to find this source code?

 - Did not find in framework sources.
 - I tried the website link but it does not work:
 www.gnoga.com/source which redirects to
 www.gnoga.com:8889/source

 Thx,

 olivier

 On Fri, Apr 3, 2015 at 9:07 AM, Rabbi David Botton 
 da...@botton.com wrote:

 Look at the code for the Gnoga web. It uses the jQueryUI
 packages in Gnoga.
 On Fri, Apr 3, 2015 at 1:52 AM Olivier Henley 
 olivier.hen...@gmail.com wrote:

 Hey,

 I was wondering what is the strategy if I want to code a
 sliding panel transitioning from outside the browser window to 
 some
 inside placement? Something similar to the Gnoga welcome page.

 Thx,

 olivier
 
 --
 Dive into the World of Parallel Programming The Go Parallel
 Website, sponsored
 by Intel and developed in partnership with Slashdot Media, is
 your hub for all
 things parallel software development, from weekly thought
 leadership blogs to
 news, videos, case studies, tutorials and more. Take a look
 and join the
 conversation now. http://goparallel.sourceforge.net/
 ___
 Gnoga-list mailing list
 Gnoga-list@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/gnoga-list



 
 --
 BPM Camp - Free Virtual Workshop May 6th at 10am PDT/1PM EDT
 Develop your own process in accordance with the BPMN 2 standard
 Learn Process modeling best practices with Bonita BPM through
 live exercises
 http://www.bonitasoft.com/be-part-of-it/events/bpm-camp-virtual-
 event?utm_
 source=Sourceforge_BPM_Camp_5_6_15utm_medium=emailutm_
 campaign=VA_SF
 ___
 Gnoga-list mailing list
 Gnoga-list@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/gnoga-list




 

Re: [Gnoga-list] Position of last Drop

2015-04-09 Thread Gautier de Montmollin
Followup - after some googling, there seems to be a few ways that might work on 
most browsers:
Use the dragover event (GNOGA appears not to support it yet)
Use event.clientX upon drop (is there a way to obtain that information in GNOGA 
?)
Cheers
Gautier
___
http://developer.mozilla.org/en-US/docs/Web/Guide/HTML/Drag_operations#drophttp://stackoverflow.com/questions/13435690/html5-drag-and-drop-mouse-position-in-firefoxhttp://stackoverflow.com/questions/2438320/html5-dragover-drop-how-get-current-x-y-coordinates
--
BPM Camp - Free Virtual Workshop May 6th at 10am PDT/1PM EDT
Develop your own process in accordance with the BPMN 2 standard
Learn Process modeling best practices with Bonita BPM through live exercises
http://www.bonitasoft.com/be-part-of-it/events/bpm-camp-virtual- event?utm_
source=Sourceforge_BPM_Camp_5_6_15utm_medium=emailutm_campaign=VA_SF___
Gnoga-list mailing list
Gnoga-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gnoga-list