Coder Social home page Coder Social logo

Marco in action about phoebusgen HOT 3 CLOSED

grasswang avatar grasswang commented on June 3, 2024
Marco in action

from phoebusgen.

Comments (3)

tynanford avatar tynanford commented on June 3, 2024

Hi, yes that is a good idea. I'll work on adding a .macro method to ActionButton class. Thanks!

from phoebusgen.

tynanford avatar tynanford commented on June 3, 2024

This should be fixed in 9c36c91

For now, actions are simply methods. So I added the macros option to the method. Eventually, it might make sense for an Action to be a class with its own methods so you don't have to define everything in the parameter list.

>>> from phoebusgen import widget as w
>>> a = w.ActionButton('test', 'test', 'test',0,0,0,0)
>>> a.action_open_display('main_bpm.bob','tab', macros={'BPM': 'BPMA'})
>>> a
<?xml version="1.0" ?>
<widget type="action_button" version="2.0.0">
 <name>test</name>
 <x>0</x>
 <y>0</y>
 <width>0</width>
 <height>0</height>
 <pv_name>test</pv_name>
 <text>test</text>
 <actions>
   <action type="open_display">
     <description>Open Display</description>
     <macros>
       <BPM>BPMA</BPM>
     </macros>
     <file>main_bpm.bob</file>
     <target>tab</target>
   </action>
 </actions>
</widget>

Uploaded to pip so you can upgrade the package

from phoebusgen.

grasswang avatar grasswang commented on June 3, 2024

Wow, it was fast, and it works! Thanks a lot!

from phoebusgen.

Related Issues (10)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.