Dev environment:
Windows 10
Fuse 1.4.0 (build 14778)
This morning I've noticed I'm getting a warning showing up when I build my project:
build\Local\Designer\cache\ux13\ClearButton.g.uno(6.19): W0000: ClearButton.Width hides inherited member Fuse.Elements.Element.Width -- use the 'new' modifier if hiding is intentional
C:\myproject\build\Local\Designer\cache\ux13\ClearButton.g.uno(6,20): Warning W0000: ClearButton.Width hides inherited member Fuse.Elements.Element.Width -- use the 'new' modifier if hiding is intentional(2.0 s)
As far as I can tell, I keep getting this warning even when I reset my code back to its state before the warning was showing up.
Doing uno clean or manually deleting the build folder does not seem to fix the problem either.
The warning originates from the fact that you have created a custom ux:Class with the name ClearButton, and inside of that class you have defined a ux:Property with the name Width.
Since Width is an already existing default property for all visuals that inherit from Fuse.Elements.Element (which is many, if not all) in Fuse, you're essentially hitting a reserved name.
Lucky for you, it's just a warning. It is very likely that you're not experiencing any unwanted side effects, unless you're using the Width property in very exotic ways.
To solve the issue and get rid of the warning, give that property a different name.
Related
I'm trying to set up a text widget that highlights the searched word, when I open a new file with QPlainText::setDocument, then immediately use QPlainText::setExtraSelections I get a SIGSEV crash in:
QTextDocumentPrivate::rootFrame
QTextDocumentPrivate::frameAt
QTextCursorPrivate::complexSelectionTable
QTextCursor::hasComplexSelection
QWidgetTextControl::selectionRect
QWidgetTextControl::setExtraSelections
QTextDocumentPrivate is causing a SIGSEV because it is a null this pointer. But this doesn't happen if no word is set before the document is loaded.
I must be supposed to do something to force it to generate the QTextDocumentPrivate. But I have no idea what that is.
Actually, this happens because QPlainText::setDocument does not remove the prior results of QPlainText::setExtraSelections. So when setting the new selections tries to remove the previous things selected, they all have invalid pointers and that causes the crash.
To fix it call: textEdit->setExtraSelections({}); to clear out the selections prior to calling QPlainText::setDocument.
I have a table with different methods, for example, one of them is validateWrite, when setting Field A to value X, Field B and C has to be filled in.
Suddenly (without changing code, I have compared the code with the test enviroment, it does work there) the validateWrite has stopped working.
I have tried to recompile the table, but that did not work.
Any idea why it suddenly (without making other modifications in this enviroment, or generating a CIL) stopped working and what i can try to solve it?
If some piece of code is calling table.doInsert(), it skips the validateWrite() method.
If the environments are truly identical, then I would try closing your AX client and deleting your user caches (see http://dynamics-ax-live.blogspot.com/2010/03/more-information-about-auc-file.html) where you delete all of the *.auc files located at C:\Users\[Username]\AppData\Local
In addition to what that tells you to delete, I'd also remove the *.kti file and all of the files & folders inside of C:\Users\[UserName]\AppData\Local\Microsoft\Dynamics Ax
Then open AX, see if the problem still exists. Then full system compile, CIL build, and delete your usage data.
The preferred route though would be to just drop a breakpoint in and debug the code to see what the execution stack is.
I have a Plone 4 site which stopped to rename new Archetypes objects; after creation (as something like /temp/portaltype.2015-04-23.1234567890) and saving the first changes, including giving it a title, it should be renamed to something nicer (/temp/an-object-with-a-meaningful-name), but this doesn't happen anymore.
Perhaps the problem arose when I applied some changes to update Plone from 4.3.3 to 4.3.4 (to make one step at a time); but I have inherited a long versions.cfg which is solely sorted by package names and doesn't include any hints why certain versions were chosen ...
I'm able to go back two months and have a version which does the renaming, but without more knowledge about what to look for, it will be a very time-consuming process of re-applying every single change, rebuilding, starting and testing; but there have not been any changes to my schema definitions. I have a temp browser which is involved in delivering the primary edit form. but this doesn't seem to be the case for the saving action.
Sadly I don't fully understand yet the mechanisms of the base_edit action which should - as far as I understand - call Archetypes.BaseObject.processForm and implicitly ._renameAfterCreation, so I'd be grateful for some pointers how to debug this. Thank you!
Update:
I have a few triggers in my product's configure.zcml, e.g.:
<subscriber
for=".content.portaltype.PortalType
Products.Archetypes.interfaces.IObjectInitializedEvent"
handler=".events.onInitPortalType"/>
… with, in events.py:
def onInitPortalType(self, event):
"""
Called after first edit of new objects?
"""
print '/// onInitPortalType(%(self)r, %(event)r)' % locals()
setInitialOwner(self, event)
setStateToPrivate(self, event)
However, the event doesn't seem to be triggered, since I couldn't find the output in an instance fg session.
Update 2:
I noticed that zope.event had been pinned to a quite old version (3.5.2), so I'm trying to update to 4.3.4 more seriously now (following this how-to). This got me zope.event v4.0.3, but I have a version conflict now:
There is a version conflict.
We already have: zc.recipe.egg 1.3.2.
While:
Installing.
Getting section test.
Initializing section test.
Installing recipe zc.recipe.testrunner.
There seems to be a requirement for zc.recipe.egg < 2dev somewhere, but I can't find it.
Nothing significant changed between Plone 4.3.3 and 4.3.4 on Archetypes. Products.Archetypes changed from 1.9.7 to 1.9.8 and Products.ATContentTypes remains on the same version.
Pointers could be:
There's a _at_rename_after_creation flag, which is True by default. This can be changed on the content type class.
Is your type still activated in portal_factorytool? (Afaik this should have no impact on renaming after creation - but who knows :-))
Any Products.Archetypes.interfaces.IObjectInitializedEvent subscriber?
Issue I had once was, that the tmp id portaltype.2015-04-23.1234567890 had the wrong format and AT did no recognise it as tmp id and therefore it did not rename it after creation. The method AT uses to check if the id is autogenerated --> https://github.com/plone/Products.CMFPlone/blob/4.3.4/Products/CMFPlone/utils.py#L111 AFAIK the problem was, that the meta_type and portal_type was not the same anymore.
I am testing ExtJS 4.2 (4.2.1) with my existing code, and it mostly works, except for one serious problem: when my page loads, I get a JS error:
Ext.fly(div).down(me.getNodeContainerSelector(), true) is null
It happens in:
ext-all-debug.js l.105020 - createRowElement of Ext.view.Table
called from ext-all-debug.js l.112748 - onStoreUpdate of Ext.grid.feature.Summary)
The call stack is too long to put here, but it happens after a 'sort' event is fired on the grid, which is empty at this point (it is populated later). The sort happens as the grid constructor calls initState(), trying to apply a saved state (the grid is stateful).
I tried to remove the saved state data, which helped the process go one step further: the grid was drawn but then it started loading and got stuck again in onStoreUpdate(), in the same manner.
What am I doing wrong here ?
Had the same issue after upgrading to 4.2.1 from 4.1.2a. Changed how I defined features and plugins on the grid. Now using ptype and ftype. Seemed to solve it.
I have a custom type made using dexterity and plone.app.stagingbehavior installed. I can check in and check out my custom type, but trying to view the diff results in a stack trace because plone.app.iterate.browser.diff.DiffView doesn't seem to know how to get the baseline and working copy versions for objects made using dexterity/p.a.stagingbehavior.
I did try overriding DiffView and changing it to use get_baseline and get_working_copy from from plone.app.stagingbehavior.utils, but the diff view still doesn't work (with a different exception, ten thousand levels deep in Products.Archetypes, so I assume it's not likely to work). Perhaps collective.dexteritydiff would help at this point.
It's a bit confusing because p.a.stagingbehavior includes a link to ##iterate_diff in its version of the plone.app.iterate.checkout_info portlet, which makes me think it's intended to work and maybe my setup is broken or I've done something wrong.
The problem is due to plone.app.iterate.browser.diff.DiffView not being compatible with Dexterity yet. The diff-view calls context.getReferences which raises an AttributeError on dexterity objects. Since this happens in a __init__ method the traceback is swallowed. It should use __call__ and code to get the references like plone.app.stagingbehavior.utils does.