Refresh iScroll on click - refresh

here is working Demo if you put screen size to width:360x540 and click on title or date it opens but then you will see that scrolling isn't working.
I have try to setup callback function
myScroll.refresh ()
after it opens even i have tried to destroy then build new scroll but then i get some errors.
In configuration of
iScroll.js
i have put
checkDOMChanges:true
but no help.

In my project we faced same issue, my team solved the issue by adding timeout
code as follows:
/* s */
setTimeout(function(){
iscrollName.refresh();
},300) // you can changed the interval until whats you want
/* e */

Related

Actions Menu Interactive Grid

Is there any way to remove 'Chart' from Actions Menu in an Interactive Grid?
So I posted a short answer that should have honestly probably been a comment with a link to https://hardlikesoftware.com/weblog/2017/01/24/how-to-hack-apex-interactive-grid-part-2/
Then I had some time and decided to try to actually execute this and got to a solution thanks to https://community.oracle.com/thread/4324589 where they also further reference https://community.oracle.com/thread/4319050
So you know where to go for more information on this topic.
As for your solution:
Go into the Attributes of the IG, Find Javascript Initialization Code under Advanced.
Then paste the following code:
function(config) {
var toolbarData = $.apex.interactiveGrid.copyDefaultToolbar();
config.toolbarData = toolbarData;
toolbarData.toolbarRemove( "chart-view" );
return config;
}
Hope this works for you, it worked for me.
EDIT:
In response to you asking how to find the name to remove.
Well thats not exactly simple. See if perhaps its mentioned in one of the posts. Otherwise you will have to search through the js file.
How I went about it is that once on the page, I opened up the console and ran $.apex.interactiveGrid.copyDefaultToolbar();
, opened up the returned array, and jumped to the definition of ToolbarRemove. This opened up InteractiveGrid.min.js so I could search there. Then I Ctrl + F there to find "chart".
What you could also do so you arent just searching blindly until you find it is that these labels need to be referenced for translation. So if you go to
http://translate-apex.com
And you find what the label is called, you can just search for that.
For the chart you could go to the translations and find the Chart item which is APEX.IG.CHART. Then in the js you find APEX.IG.CHART which only occurs once, instead of the 10 times "chart" occurs.
EDIT 2:
You asked about the Flashback dialog.
function(config) {
var toolbarData = $.apex.interactiveGrid.copyDefaultToolbar();
config.toolbarData = toolbarData;
toolbarData.toolbarRemove( "show-flashback-dialog" );
return config;
}
This works for me
Check the attributes of the interactive grid and turn off the "Define chart view"
Check this image

Qt: How to change QWizard default buttons

I'm making a program with Qt 4.8.5 on a Fedora system (unix). It's a QWizard structure with its QWizardPages.
I needed to change the default QWizard buttons (back, next, finish...) and customize it. I found I could do it putting the next lines on the constructor of my QWizard class called BaseWizard (class BaseWizard : public QWizard)
QList<QWizard::WizardButton> button_layout;
button_layout <<QWizard::Stretch << QWizard::CustomButton1 << QWizard::BackButton << QWizard::NextButton << QWizard::FinishButton;
this->setOptions(QWizard::NoDefaultButton);
With that what I have from left to right is one custom buttons, the back button, the next button and the finish button, and when I want I can show or hide the custom buttons with SetVisible() / SetDisabled() / setEnabled() functions.
That worked perfect for what I wanted until now... I have to make some changes to the program so I need to change those buttons depending on the page the user is. As I said before, I know I can change the visibility of CustomButton 1 for example BUT I can't do the same with back button so... my quesiton is: How can I decide which buttons I show in every QWizardPage (and their text) and which is the best way to do it?
I've tried creating a function on my BaseWizard
// Function to have only 2 custom buttons
void BaseWizard::ChangeButtons()
{
QList<QWizard::WizardButton> button_layout;
button_layout <<QWizard::Stretch << QWizard::CustomButton1 << QWizard::CustomButton2;
setButtonLayout(button_layout);
}
And then in the QWizardPage (lets call it WP) using it like:
BaseWizard *bz;
bz->ChangeButtons();
But when I do that nothing changes.I can still see the NextButon for example. I have tried also using first a button_layout.clear(); to see if clenaing it before adding the buttons works, but not.
I have also tried changing the text of CustomButton1. If I do it in the WP after calling ChangeButtons with
wizard()->button(QWizard::CustomButton1)->setText("TEXT CHANGED");
Then the text changes but if I put it in the ChangeButton() function with this->button(QWizard::CustomButton1)->setText("BBBBB"); it does nothing (But its entering into the funcion). Ofc if I try to change the text of CustomButton2 in WP nothing happens because I can't still see that button... so any idea of what I am doing wrong or how could I get what I try will be very apreciated,
Thank you so much.
Ok, I finally knew why was my program crashing... I put here the solution if anyone needs it in the future:
BaseWizard *bz; // <-- HERE is the problem
bz->ChangeButtons();
I was not initializing the pointer so it has to be changed to:
BaseWizard *bz = dynamic_cast<BaseWizard*>(wizard());

Qt wizard back button Ui issue

I'm new with Qt and I'm making a little application. I've do it with QWizard and QWizardPages.
I Have added 2 CustomButtons to the wizard so it has 5 buttons down: ButA, ButB, Back, Next/Finish, and Cancel.
ButA and ButB don't have to appear in all WizardPages. Eg:
WP0: just ButB
WP1: ButA and ButB
To do that, I have:
void WP0::initializePage()
{
wizard()->button(QWizard::CustomButton1)->setVisible(false);
}
With that when the app starts, you can't see butA. BUT if you go to the next page (where you see ButA and ButB) and then you click on BackButton, then you see ButA in WP0.
I supose that then you click on BackButton there is no call to WP0::initializePage() so my question is: how or where should I call that wizard()->button(QWizard::CustomButton1)->setVisible(false);
to never see ButA on WP0 ? Or what should I do?
I don't know if I understand your question completely. your description is kind of complicated. I think you should try button's events. It means you should call this function in press event or something like that and it's better that you define a boolean variable for true or false and call it by reference. I think this should solve your problem.

Signal and slot Qt

I’m trying to write a very simple calendar program (I’m trying to learn Qt). The program itself is very basic, all it does is open a dialog box which displays today’s date with a button next to it. When the button is pressed another dialog opens, which I’ll call the calendar picker.
Here is the gist of the program: First, the main dialog opens with the current date. Then when the button shown in the picture is pushed, a signal is sent to a function which opens the picker and sets up a connection between the two classes which I'll describe below! The picker opens in which you can choose a date if you want. Let's say you choose a date by double clicking it. A signal is then sent to a function which closes the picker and the function then emits a signal to the main dialog to update the date to the new date. Now here's the problem:
Both the main dialog and the picker are in separate classes and I'm trying to set up a connection between the two classes when an item is double clicked.
***EDIT: Ok, now my problem is that I have Picker *mypicker declared in my header file and when I try using it in the .cpp file for example mypicker->show(); it causes the program to crash. Anyone know why?
Any help would be appreciated!!
undefined reference to MainDialog::updateDate(QDate)
Usually means that the compiler or the linker can't find the reference to it. So in your header, you make a promise that it will exist.
Then if when matching things up later the reference was never found... you get an error.
So what probably happened is one of a few things:
In your maindialog.cpp file you have:
// Either no definition of updateDate at all, Wrong because you put in your header a declaration for one.
void updateDate(QDate date) // Wrong because it doesn't specify MainDialog
{
}
void MainDialog::updateDate() // Wrong because it doesn't match the parameter list
{
}
void MainDialog::updatedate(QDate date) // Wrong because the function name is off
{
}
QDate MainDialog::updateDate(QDate date) // Wrong because return type is off
{
}
void MainDialog::updateDate(QDate date) // Correct! Matches the header file perfectly!
{
}
Then after you get past that, and other compile errors, keep an eye on the Application Output, because the connect call is a runtime connection, so it won't report a syntax mis-alignment until at the moment a connection is attempted.
Hope that helps.

Touch Up Inside event not working after rotation of tab bar

I have a button in one of view controller of tab bar controller. All set up in storyboard. I registered action method like this
- (IBAction)buttonPressed:(id)sender {
NSLog(#"Button pressed");
}
The thing is that once I make left and top constraints (to force it stay in the right upper corner) touch up inside event stops working after I change rotation. So just open app in portrait mode - method is working. Change to landscape and I cannot tap button suddenly.
I've recreated problem in this easy example project.
Many thanks.
Just put the following code in you TabBarViewController class.
- (void)viewDidLayoutSubviews
{
// fix for iOS7 bug in UITabBarController
self.selectedViewController.view.superview.frame = self.view.bounds;
}
Recently I noticed same bug in my application. First I tried Slavco Petkovski method. But this caused me another bug with rotating and getting right bounds and frame, so I kept searching.
I found another solution for this problem, mainly setting autoresizing mask of view controller's view in xib. But since arrows in inspector in my Xcode (version 5.0.1) are inactive and you can't set them, you have to open xib file in text editor find autoresizingMask property for main view and change it like this:
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
EDIT:
Alternatively you can do this in your view controller's code - same result as in changes in xcode:
self.view.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight;