FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin para Harbour/xHarbour ayuda con Createobject()
Posts: 1516
Joined: Thu May 27, 2010 02:06 PM
ayuda con Createobject()
Posted: Tue Apr 19, 2016 08:52 AM
Estoy intentando manejar una tableta de firmas de wacom y en principio se puede acceder a un objeto COM que se instala, usando createobject() .
El acceso al objeto com funciona y acedo a sus propiedades y puede borrrar pantalla y demas pero ...
¿ como se crea un delegado de la funcion m_table:onPenData() ?

os pongo el codigo en javascript que ponen de ejemplo ...
Code (fw): Select all Collapse
   m_tablet = createObject("WacomGSS.STU.Tablet");   

   .........
   // Add the delagate that receives pen data and error.

      if (useActiveX) {
        eval("function m_tablet::onPenData(data) {return onPenData(data);}");
        eval("function m_tablet::onGetReportException(exception) {return onGetReportException(exception);}");
      } else {
        m_tablet.onPenData = onPenData;
        m_tablet.onGetReportException = onGetReportException;
      }

      // Initialize the screen
      clearScreen();


Gracias anticipadas.
Posts: 8515
Joined: Tue Dec 20, 2005 07:36 PM
Re: ayuda con Createobject()
Posted: Tue Apr 19, 2016 02:27 PM
João Santos - São Paulo - Brasil - Phone: +55(11)95150-7341
Posts: 1516
Joined: Thu May 27, 2010 02:06 PM
Re: ayuda con Createobject()
Posted: Tue Apr 19, 2016 04:00 PM
karinha wrote:Master, algo asi?

http://fivetechsupport.com/forums/viewtopic.php?f=3&t=30070&start=15

http://wiki.fivetechsoft.com/doku.php?id=manipulating_mdb

Saludos.

karinha , creo que no :-).
Se tendria que tratar como algo asi :

ownd:bMMoved := { || data := m_tablet:onPenData() }
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: ayuda con Createobject()
Posted: Tue Apr 19, 2016 05:11 PM

Manuel,

Como está definido onPenData en el ejemplo en javascript ?

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 1516
Joined: Thu May 27, 2010 02:06 PM
Re: ayuda con Createobject()
Posted: Tue Apr 19, 2016 08:19 PM
Antonio , es una función , el objeto COM delega en ella la captura de datos.
Lo he resuelto usando el html dentro de un Activex a "Shell.iExplore.2" :-) , pero la duda de como seria sigue ...
Code (fw): Select all Collapse
  function onPenData(penData) { // Process incoming pen data
    var pt = tabletToScreen(penData);

    var btn = 0; // will be +ve if the pen is over a button.
    for (var i = 0; i < m_btns.length; ++i) {
      if (m_btns[i].Bounds.Contains(pt)) {
        btn = i + 1;
        break;
      }
    }

    var isDown = (penData.sw != 0);
   .........
Posts: 728
Joined: Fri Oct 07, 2005 07:38 AM
Re: ayuda con Createobject()
Posted: Thu Nov 16, 2017 05:06 PM

Hola! Estoy peleándome con una wakom (stu-430) ¿lograste hacerlo funcionar?

Gracias

Angel Salom
Visionwin Software - https://www.visionwin.com
------------------------------------------------------------
fwh 19.05 - harbour 3.2 - bcc 7.4

Continue the discussion