Comments (3)
Hi, yes that is a good idea. I'll work on adding a .macro method to ActionButton class. Thanks!
from phoebusgen.
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.
Wow, it was fast, and it works! Thanks a lot!
from phoebusgen.
Related Issues (10)
- allow site specific predefined colors and fonts HOT 2
- add font doesn't work as expected HOT 1
- Finish remaining widgets HOT 2
- Make font properties more general HOT 1
- Complete image, strip chart, and XY plot widgets HOT 1
- Complete StripChart Widget
- Complete XYPlot Widget
- Complete Image Widget
- add hex option to color methods HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from phoebusgen.